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

This commit is contained in:
刘祥超
2022-12-21 16:11:55 +08:00
parent c45f7adf04
commit 18611e8a7c

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