1
0
mirror of https://github.com/fumiama/WireGold.git synced 2026-06-10 03:28:22 +08:00

fix(ci): debug log printing

This commit is contained in:
源文雨
2024-08-07 23:55:42 +08:00
parent d577ae2e16
commit a0322b7d21
2 changed files with 7 additions and 2 deletions

View File

@@ -448,7 +448,9 @@ func (conn *Conn) WriteToPeer(b []byte, ep p2p.EndPoint) (n int, err error) {
return 0, errors.New("data size " + strconv.Itoa(len(b)) + " is too large")
}
if (!conn.suberr || len(conn.subs) > 0) && !conn.cplk.TryLock() {
logrus.Infoln("[tcp] try sub write")
if config.ShowDebugLog {
logrus.Debug("[tcp] try sub write to", tcpep)
}
n, err = conn.writeToPeer(b, tcpep, true) // try sub write
if err == nil {
return