mirror of
https://github.com/fluencelabs/tendermint
synced 2025-05-24 03:31:21 +00:00
add more info to error messages
This commit is contained in:
parent
e4f3f9d9bf
commit
4aa024d843
@ -26,6 +26,7 @@ package pubsub
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
"fmt"
|
||||||
|
|
||||||
cmn "github.com/tendermint/tmlibs/common"
|
cmn "github.com/tendermint/tmlibs/common"
|
||||||
"github.com/tendermint/tmlibs/log"
|
"github.com/tendermint/tmlibs/log"
|
||||||
@ -174,7 +175,7 @@ func (s *Server) PublishWithTags(msg interface{}, tags map[string]interface{}) e
|
|||||||
select {
|
select {
|
||||||
case s.cmds <- pubCmd:
|
case s.cmds <- pubCmd:
|
||||||
default:
|
default:
|
||||||
s.Logger.Error("Server overflowed, dropping message...", "msg", msg)
|
s.Logger.Error("Server overflowed, dropping message...", "msg", msg, "tags", fmt.Sprintf("%v", tags))
|
||||||
return ErrorOverflow
|
return ErrorOverflow
|
||||||
}
|
}
|
||||||
case wait:
|
case wait:
|
||||||
@ -297,7 +298,7 @@ func (state *state) send(msg interface{}, tags map[string]interface{}, slowClien
|
|||||||
select {
|
select {
|
||||||
case ch <- msg:
|
case ch <- msg:
|
||||||
default:
|
default:
|
||||||
logger.Error("Client is busy, skipping...", "clientID", clientID)
|
logger.Error("Wanted to send a message, but the client is busy", "msg", msg, "tags", fmt.Sprintf("%v", tags), "clientID", clientID)
|
||||||
}
|
}
|
||||||
case wait:
|
case wait:
|
||||||
ch <- msg
|
ch <- msg
|
||||||
|
Loading…
x
Reference in New Issue
Block a user