Browse Source

Merge pull request #2858 from notsure2/update-last-activity-on-send-tcp-handler

Update TCPHandler.lastActivity upon successful send of bytes.
tags/4.2.0.0
Allen Zhu GitHub 4 years ago
parent
commit
6962cfe373
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
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