Explorar el Código

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

Paul-Louis Ageneau hace 2 años
padre
commit
ca795c2a02
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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(); }