Skip to content

Commit

Permalink
Revert "Network: fix a concurrency problem, by re-adding a copy in Co…
Browse files Browse the repository at this point in the history
…nnectionCommand"

This reverts commit 5b04f5e.
  • Loading branch information
nerzhul committed Sep 4, 2017
1 parent 5b04f5e commit 31e0f0e
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/network/connection.h
Expand Up @@ -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_)
{
Expand Down

0 comments on commit 31e0f0e

Please sign in to comment.