Browse Source

log a notification to help debug user issues

pull/724/head
Anton Kaliaev 7 years ago
parent
commit
5c331d8276
No known key found for this signature in database GPG Key ID: 7B6881D965918214
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      rpc/lib/server/handlers.go

+ 2
- 0
rpc/lib/server/handlers.go View File

@ -116,6 +116,7 @@ func makeJSONRPCHandler(funcMap map[string]*RPCFunc, logger log.Logger) http.Han
// A Notification is a Request object without an "id" member.
// The Server MUST NOT reply to a Notification, including those that are within a batch request.
if request.ID == "" {
logger.Debug("HTTPJSONRPC received a notification, skipping... (please send a non-empty ID if you want to call a method)")
return
}
if len(r.URL.Path) > 1 {
@ -521,6 +522,7 @@ func (wsc *wsConnection) readRoutine() {
// A Notification is a Request object without an "id" member.
// The Server MUST NOT reply to a Notification, including those that are within a batch request.
if request.ID == "" {
wsc.Logger.Debug("WSJSONRPC received a notification, skipping... (please send a non-empty ID if you want to call a method)")
continue
}


Loading…
Cancel
Save