chain: trace log timed out ZMQ connections

This commit is contained in:
Wilmer Paulino 2019-11-08 12:39:00 -08:00
parent 36ca842905
commit 58ac163d48
No known key found for this signature in database
GPG key ID: 6DF57B9F9514972F

View file

@ -197,6 +197,8 @@ func (c *BitcoindConn) blockEventHandler() {
// error to prevent spamming the logs. // error to prevent spamming the logs.
netErr, ok := err.(net.Error) netErr, ok := err.(net.Error)
if ok && netErr.Timeout() { if ok && netErr.Timeout() {
log.Trace("Re-establishing timed out ZMQ " +
"block connection")
continue continue
} }
@ -279,6 +281,8 @@ func (c *BitcoindConn) txEventHandler() {
// error to prevent spamming the logs. // error to prevent spamming the logs.
netErr, ok := err.(net.Error) netErr, ok := err.(net.Error)
if ok && netErr.Timeout() { if ok && netErr.Timeout() {
log.Trace("Re-establishing timed out ZMQ " +
"transaction connection")
continue continue
} }