mirror of
https://github.com/bol-van/zapret.git
synced 2025-08-10 01:02:03 +03:00
tpws: fix-seg wait before send. tune max delay.
This commit is contained in:
@@ -484,10 +484,11 @@ bool socket_has_notsent(int sfd)
|
||||
|
||||
if (getsockopt(sfd, IPPROTO_TCP, TCP_INFO, (char *)&tcpi, &ts) < 0)
|
||||
return false;
|
||||
if (tcpi.tcpi_state != 1)
|
||||
if (tcpi.tcpi_state != 1) // TCP_ESTABLISHED
|
||||
return false;
|
||||
size_t s = (char *)&tcpi.tcpi_notsent_bytes - (char *)&tcpi.tcpi_state;
|
||||
if (ts < s)
|
||||
// old structure version
|
||||
return false;
|
||||
return !!tcpi.tcpi_notsent_bytes;
|
||||
}
|
||||
|
Reference in New Issue
Block a user