fix: quic message handler okay with not handled message types
@@ -81,9 +81,13 @@ func (h *QUICHandler) ServeRPC(rw rpc.ReplyWriter, request *rpc.Request) {
defer servceCancelF()
defer span.Finish()
+ 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.
func (h *QUICHandler) Handle(msgType infra.MessageType, handler infra.Handler) {
