We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a383eb0 commit 5b04f5eCopy full SHA for 5b04f5e
src/network/connection.h
@@ -330,6 +330,18 @@ struct ConnectionCommand
330
bool raw = false;
331
332
ConnectionCommand() = default;
333
+ ConnectionCommand &operator=(const ConnectionCommand &other)
334
+ {
335
+ type = other.type;
336
+ address = other.address;
337
+ peer_id = other.peer_id;
338
+ channelnum = other.channelnum;
339
+ // We must copy the buffer here to prevent race condition
340
+ data = SharedBuffer<u8>(*other.data, other.data.getSize());
341
+ reliable = other.reliable;
342
+ raw = other.reliable;
343
+ return *this;
344
+ }
345
346
void serve(Address address_)
347
{