fix: reduce log level for closing conn messages

This commit is contained in:
Richard Ramos 2023-03-02 10:44:00 -04:00 committed by RichΛrd
parent e1ea1ccab5
commit beeef4c5e7
4 changed files with 8 additions and 5 deletions

2
go.mod
View file

@ -10,6 +10,8 @@ replace github.com/nfnt/resize => github.com/status-im/resize v0.0.0-20201215164
replace github.com/forPelevin/gomoji => github.com/status-im/gomoji v1.1.3-0.20220213022530-e5ac4a8732d4
replace github.com/libp2p/go-libp2p => github.com/status-im/go-libp2p v0.25.1-debug-closing-conn
require (
github.com/anacrolix/torrent v1.41.0
github.com/beevik/ntp v0.3.0

4
go.sum
View file

@ -1345,8 +1345,6 @@ github.com/libp2p/go-cidranger v1.1.0 h1:ewPN8EZ0dd1LSnrtuwd4709PXVcITVeuwbag38y
github.com/libp2p/go-cidranger v1.1.0/go.mod h1:KWZTfSr+r9qEo9OkI9/SIEeAtw+NNoU0dXIXt15Okic=
github.com/libp2p/go-flow-metrics v0.1.0 h1:0iPhMI8PskQwzh57jB9WxIuIOQ0r+15PChFGkx3Q3WM=
github.com/libp2p/go-flow-metrics v0.1.0/go.mod h1:4Xi8MX8wj5aWNDAZttg6UPmc0ZrnFNsMtpsYUClFtro=
github.com/libp2p/go-libp2p v0.25.1 h1:YK+YDCHpYyTvitKWVxa5PfElgIpOONU01X5UcLEwJGA=
github.com/libp2p/go-libp2p v0.25.1/go.mod h1:xnK9/1d9+jeQCVvi/f1g12KqtVi/jP/SijtKV1hML3g=
github.com/libp2p/go-libp2p-asn-util v0.2.0 h1:rg3+Os8jbnO5DxkC7K/Utdi+DkY3q/d1/1q+8WeNAsw=
github.com/libp2p/go-libp2p-asn-util v0.2.0/go.mod h1:WoaWxbHKBymSN41hWSq/lGKJEca7TNm58+gGJi2WsLI=
github.com/libp2p/go-libp2p-pubsub v0.9.1 h1:A6LBg9BaoLf3NwRz+E974sAxTVcbUZYg95IhK2BZz9g=
@ -1992,6 +1990,8 @@ github.com/status-im/doubleratchet v3.0.0+incompatible h1:aJ1ejcSERpSzmWZBgtfYti
github.com/status-im/doubleratchet v3.0.0+incompatible/go.mod h1:1sqR0+yhiM/bd+wrdX79AOt2csZuJOni0nUDzKNuqOU=
github.com/status-im/go-ethereum v1.10.25-status.4 h1:Ff35UseaP49DK2RRpSLo3DL7NUmMKzicQ/7/yub6gfU=
github.com/status-im/go-ethereum v1.10.25-status.4/go.mod h1:Dt4K5JYMhJRdtXJwBEyGZLZn9iz/chSOZyjVmt5ZhwQ=
github.com/status-im/go-libp2p v0.25.1-debug-closing-conn h1:c2GgdZnkm2/kcDmegW+PjgoMjp3sCLxd9P+Qt7bsa+s=
github.com/status-im/go-libp2p v0.25.1-debug-closing-conn/go.mod h1:xnK9/1d9+jeQCVvi/f1g12KqtVi/jP/SijtKV1hML3g=
github.com/status-im/go-multiaddr-ethv4 v1.2.4 h1:7fw0Y48TJXEqx4fOHlDOUiM/uBq9zG5w4x975Mjh4E0=
github.com/status-im/go-multiaddr-ethv4 v1.2.4/go.mod h1:PDh4D7h5CvecPIy0ji0rLNwTnzzEcyz9uTPHD42VyH4=
github.com/status-im/gomoji v1.1.3-0.20220213022530-e5ac4a8732d4 h1:CtobZoiNdHpx+xurFxnuJ1xsGm3oKMfcZkB3vmomJmA=

View file

@ -173,7 +173,7 @@ func (cm *BasicConnMgr) memoryEmergency() {
// Trim connections without paying attention to the silence period.
for _, c := range cm.getConnsToCloseEmergency(target) {
log.Infow("low on memory. closing conn", "peer", c.RemotePeer())
log.Debugw("low on memory. closing conn", "peer", c.RemotePeer())
c.Close()
}
@ -375,7 +375,7 @@ func (cm *BasicConnMgr) doTrim() {
func (cm *BasicConnMgr) trim() {
// do the actual trim.
for _, c := range cm.getConnsToClose() {
log.Infow("closing conn", "peer", c.RemotePeer())
log.Debugw("closing conn", "peer", c.RemotePeer())
c.Close()
}
}

3
vendor/modules.txt vendored
View file

@ -463,7 +463,7 @@ github.com/libp2p/go-cidranger/net
# github.com/libp2p/go-flow-metrics v0.1.0
## explicit; go 1.17
github.com/libp2p/go-flow-metrics
# github.com/libp2p/go-libp2p v0.25.1
# github.com/libp2p/go-libp2p v0.25.1 => github.com/status-im/go-libp2p v0.25.1-debug-closing-conn
## explicit; go 1.18
github.com/libp2p/go-libp2p
github.com/libp2p/go-libp2p/config
@ -1324,3 +1324,4 @@ zombiezen.com/go/sqlite/sqlitex
# github.com/docker/docker => github.com/docker/engine v1.4.2-0.20190717161051-705d9623b7c1
# github.com/nfnt/resize => github.com/status-im/resize v0.0.0-20201215164250-7c6d9f0d3088
# github.com/forPelevin/gomoji => github.com/status-im/gomoji v1.1.3-0.20220213022530-e5ac4a8732d4
# github.com/libp2p/go-libp2p => github.com/status-im/go-libp2p v0.25.1-debug-closing-conn