瀏覽代碼

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(); }