@@ -221,18 +221,6 @@ func (cr *ChainRouter) HandleInbound(ctx context.Context, msg message.InboundMes
221221 return
222222 }
223223
224- requestID , ok := message .GetRequestID (m )
225- if ! ok {
226- cr .log .Debug ("dropping message with invalid field" ,
227- zap .Stringer ("nodeID" , nodeID ),
228- zap .Stringer ("messageOp" , op ),
229- zap .String ("field" , "RequestID" ),
230- )
231-
232- msg .OnFinishedHandling ()
233- return
234- }
235-
236224 cr .lock .Lock ()
237225 defer cr .lock .Unlock ()
238226
@@ -296,6 +284,18 @@ func (cr *ChainRouter) HandleInbound(ctx context.Context, msg message.InboundMes
296284 return
297285 }
298286
287+ requestID , ok := message .GetRequestID (m )
288+ if ! ok {
289+ cr .log .Debug ("dropping message with invalid field" ,
290+ zap .Stringer ("nodeID" , nodeID ),
291+ zap .Stringer ("messageOp" , op ),
292+ zap .String ("field" , "RequestID" ),
293+ )
294+
295+ msg .OnFinishedHandling ()
296+ return
297+ }
298+
299299 if expectedResponse , isFailed := message .FailedToResponseOps [op ]; isFailed {
300300 // Create the request ID of the request we sent that this message is in
301301 // response to.
0 commit comments