Browse Source

Update TCPHandler.lastActivity upon successful send of bytes.

Fixes https://github.com/shadowsocks/shadowsocks-windows/issues/2857
tags/4.2.0.0
notsure2 4 years ago
parent
commit
ede2fcacb2
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      shadowsocks-csharp/Controller/Service/TCPRelay.cs

+ 6
- 0
shadowsocks-csharp/Controller/Service/TCPRelay.cs View File

@@ -924,6 +924,12 @@ namespace Shadowsocks.Controller
var session = (AsyncSession)container[0];
var bytesShouldSend = (int)container[1];
int bytesSent = session.Remote.EndSend(ar);
if (bytesSent > 0)
{
lastActivity = DateTime.Now;
}
int bytesRemaining = bytesShouldSend - bytesSent;
if (bytesRemaining > 0)
{


Loading…
Cancel
Save