Skip to content

Commit

Permalink
fix: quic message handler okay with not handled message types (#3236)
Browse files Browse the repository at this point in the history
  • Loading branch information
juagargi authored and scrye committed Oct 10, 2019
1 parent ed4d1e8 commit 458ecd8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions go/lib/infra/messenger/quic_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,12 @@ func (h *QUICHandler) ServeRPC(rw rpc.ReplyWriter, request *rpc.Request) {
defer servceCancelF()
defer span.Finish()

handler.Handle(infra.NewRequest(serveCtx, messageContent, signedPld,
request.Address, pld.ReqId))
if handler == nil {
log.Error("Message type not handled", "type", messageType)
} else {
handler.Handle(infra.NewRequest(serveCtx, messageContent, signedPld,
request.Address, pld.ReqId))
}
}

// Handle registers the handler for the given message type.
Expand Down

0 comments on commit 458ecd8

Please sign in to comment.