Skip to content

Commit

Permalink
fix: quic message handler okay with not handled message types
Browse files Browse the repository at this point in the history
  • Loading branch information
juagargi committed Oct 9, 2019
1 parent 47f8afd commit 8d0af85
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 8d0af85

Please sign in to comment.