Browse Source

add more info to error messages

pull/1842/head
Anton Kaliaev 7 years ago
parent
commit
4aa024d843
No known key found for this signature in database GPG Key ID: 7B6881D965918214
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      pubsub/pubsub.go

+ 3
- 2
pubsub/pubsub.go View File

@ -26,6 +26,7 @@ package pubsub
import (
"errors"
"fmt"
cmn "github.com/tendermint/tmlibs/common"
"github.com/tendermint/tmlibs/log"
@ -174,7 +175,7 @@ func (s *Server) PublishWithTags(msg interface{}, tags map[string]interface{}) e
select {
case s.cmds <- pubCmd:
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
}
case wait:
@ -297,7 +298,7 @@ func (state *state) send(msg interface{}, tags map[string]interface{}, slowClien
select {
case ch <- msg:
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:
ch <- msg


Loading…
Cancel
Save