소스 검색

Fixed DataChannel::peek() clearing the peeked message by moving it

Paul-Louis Ageneau 2 년 전
부모
커밋
ca795c2a02
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/impl/datachannel.cpp

+ 1 - 1
src/impl/datachannel.cpp

@@ -114,7 +114,7 @@ optional<message_variant> DataChannel::receive() {
 
 optional<message_variant> DataChannel::peek() {
 	auto next = mRecvQueue.peek();
-	return next ? std::make_optional(to_variant(std::move(**next))) : nullopt;
+	return next ? std::make_optional(to_variant(**next)) : nullopt;
 }
 
 size_t DataChannel::availableAmount() const { return mRecvQueue.amount(); }