写数据超时时断开同客户端连接

This commit is contained in:
GoEdgeLab
2022-12-21 16:11:55 +08:00
parent de411e2209
commit d618636cf5

View File

@@ -150,6 +150,8 @@ func (this *ClientConn) Write(b []byte) (n int, err error) {
if ok {
_ = conn.SetLinger(0)
}
_ = this.rawConn.Close()
}
return