Skip to content

Commit

Permalink
tiny fix
Browse files Browse the repository at this point in the history
  • Loading branch information
GangZhuo committed Jan 5, 2016
1 parent d2833e6 commit b918cb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shadowsocks-csharp/Controller/Service/TCPRelay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,6 @@ private void PipeConnectionReceiveCallback(IAsyncResult ar)
{
int bytesRead = connection.EndReceive(ar);
totalWrite += bytesRead;
tcprelay.UpdateOutboundCounter(bytesRead);

if (bytesRead > 0)
{
Expand All @@ -601,6 +600,7 @@ private void PipeConnectionReceiveCallback(IAsyncResult ar)
encryptor.Encrypt(connetionRecvBuffer, bytesRead, connetionSendBuffer, out bytesToSend);
}
Logging.Debug(remote, bytesToSend, "TCP Relay", "@PipeConnectionReceiveCallback() (upload)");
tcprelay.UpdateOutboundCounter(bytesToSend);
remote.BeginSend(connetionSendBuffer, 0, bytesToSend, 0, new AsyncCallback(PipeRemoteSendCallback), null);

IStrategy strategy = controller.GetCurrentStrategy();
Expand Down

0 comments on commit b918cb8

Please sign in to comment.