mirror of
https://github.com/fumiama/WireGold.git
synced 2026-06-12 12:50:28 +08:00
fix(p2p): tcp sub conn add close write
This commit is contained in:
@@ -137,6 +137,15 @@ func (conn *Conn) accept() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func delsubs(i int, subs []*subconn) []*subconn {
|
func delsubs(i int, subs []*subconn) []*subconn {
|
||||||
|
tcpconn := subs[i].conn
|
||||||
|
err := tcpconn.CloseWrite()
|
||||||
|
if config.ShowDebugLog {
|
||||||
|
if err != nil {
|
||||||
|
logrus.Debugln("[tcp] close sub write from", tcpconn.LocalAddr(), "to", tcpconn.RemoteAddr(), "err:", err)
|
||||||
|
} else {
|
||||||
|
logrus.Debugln("[tcp] close sub write from", tcpconn.LocalAddr(), "to", tcpconn.RemoteAddr())
|
||||||
|
}
|
||||||
|
}
|
||||||
switch i {
|
switch i {
|
||||||
case 0:
|
case 0:
|
||||||
subs = subs[1:]
|
subs = subs[1:]
|
||||||
|
|||||||
Reference in New Issue
Block a user