Skip to content

Commit

Permalink
Disable registerListener() code
Browse files Browse the repository at this point in the history
The code was wrong because the request IP & port
is not the same as the listening IP & port of the
server which established the connection.

The net effect the previous code had was that
nodes would share their incoming connection
IP & ports to other nodes, resulting in an
explosion of addresses which each node tried to
(unsuccessfully) connect to.
  • Loading branch information
AndrejMitrovic authored and Geod24 committed Aug 13, 2020
1 parent 998f727 commit 331e518
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion source/agora/node/Runner.d
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,11 @@ public FullNode runNode (Config config)
{
string addr = format("http://%s:%d",
req.clientAddress.toAddressString(), req.clientAddress.port());
node.registerListener(addr);

// TODO: disabled as this code is wrong. The client port here is not
// the listening port of the node which tried to establish a connection.
version (none)
node.registerListener(addr);
res.statusCode = 200;
res.writeVoidBody();
});
Expand Down

0 comments on commit 331e518

Please sign in to comment.