1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-06-27 09:55:22 +00:00

agreesively close unresponding connections

This commit is contained in:
v2ray 2016-06-29 13:42:11 +02:00
parent 0047910a81
commit c5170a36f0
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -377,6 +377,10 @@ func (kcp *KCP) flush() {
if kcp.state == StateTerminated {
return
}
if kcp.state == StateActive && _itimediff(kcp.current, kcp.lastIncomingTime) >= 30000 {
kcp.OnClose()
}
if kcp.state == StateTerminating {
kcp.output.Write(&CmdOnlySegment{
Conv: kcp.conv,