فهرست منبع

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