Skip to content
Permalink
Browse files

Revert "Network: fix a concurrency problem, by re-adding a copy in Co…

…nnectionCommand"

This reverts commit 5b04f5e.
  • Loading branch information...
nerzhul committed Sep 4, 2017
1 parent 5b04f5e commit 31e0f0efe93a987b7d472dbece18a3d95b00fa96
Showing with 0 additions and 12 deletions.
  1. +0 −12 src/network/connection.h
@@ -330,18 +330,6 @@ struct ConnectionCommand
bool raw = false;

ConnectionCommand() = default;
ConnectionCommand &operator=(const ConnectionCommand &other)
{
type = other.type;
address = other.address;
peer_id = other.peer_id;
channelnum = other.channelnum;
// We must copy the buffer here to prevent race condition
data = SharedBuffer<u8>(*other.data, other.data.getSize());
reliable = other.reliable;
raw = other.reliable;
return *this;
}

void serve(Address address_)
{

0 comments on commit 31e0f0e

Please sign in to comment.
You can’t perform that action at this time.