I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit f98101af authored by zzz's avatar zzz
Browse files

* i2psnark: Better track outgoing bandwidth by incrementing

      counter before the blocking write
parent 4fae7a8c
Branches
Tags
No related merge requests found
......@@ -151,7 +151,11 @@ class PeerConnectionOut implements Runnable
{
if (_log.shouldLog(Log.DEBUG))
_log.debug("Send " + peer + ": " + m + " on " + peer.metainfo.getName());
m.sendMessage(dout);
// This can block for quite a while.
// To help get slow peers going, and track the bandwidth better,
// move this _after_ state.uploaded() and see how it works.
//m.sendMessage(dout);
lastSent = System.currentTimeMillis();
// Remove all piece messages after sending a choke message.
......@@ -162,6 +166,7 @@ class PeerConnectionOut implements Runnable
if (m.type == Message.PIECE)
state.uploaded(m.len);
m.sendMessage(dout);
m = null;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment