mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-11-16 17:38:45 -05:00
agreesively close unresponding connections
This commit is contained in:
parent
0047910a81
commit
c5170a36f0
@ -377,6 +377,10 @@ func (kcp *KCP) flush() {
|
|||||||
if kcp.state == StateTerminated {
|
if kcp.state == StateTerminated {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if kcp.state == StateActive && _itimediff(kcp.current, kcp.lastIncomingTime) >= 30000 {
|
||||||
|
kcp.OnClose()
|
||||||
|
}
|
||||||
|
|
||||||
if kcp.state == StateTerminating {
|
if kcp.state == StateTerminating {
|
||||||
kcp.output.Write(&CmdOnlySegment{
|
kcp.output.Write(&CmdOnlySegment{
|
||||||
Conv: kcp.conv,
|
Conv: kcp.conv,
|
||||||
|
Loading…
Reference in New Issue
Block a user