agreesively close unresponding connections

pull/215/head
v2ray 9 years ago
parent 0047910a81
commit c5170a36f0
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

@ -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,

Loading…
Cancel
Save