File tree 2 files changed +11
-2
lines changed
src/main/java/com/rabbitmq/client/impl
2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -143,8 +143,12 @@ public void handleCompleteInboundCommand(AMQCommand command) throws IOException
143
143
if (!processAsync (command )) {
144
144
// The filter decided not to handle/consume the command,
145
145
// so it must be some reply to an earlier RPC.
146
- nextOutstandingRpc ().handleCommand (command );
147
- markRpcFinished ();
146
+ RpcContinuation nextOutstandingRpc = nextOutstandingRpc ();
147
+ // the outstanding RPC can be null when calling Channel#asyncRpc
148
+ if (nextOutstandingRpc != null ) {
149
+ nextOutstandingRpc .handleCommand (command );
150
+ markRpcFinished ();
151
+ }
148
152
}
149
153
}
150
154
Original file line number Diff line number Diff line change @@ -134,6 +134,11 @@ public void run() {
134
134
key .cancel ();
135
135
continue ;
136
136
}
137
+ if (state .getConnection () == null ) {
138
+ // we're in AMQConnection#start, between the header sending and the FrameHandler#initialize
139
+ // let's wait a bit more
140
+ continue ;
141
+ }
137
142
138
143
DataInputStream inputStream = state .inputStream ;
139
144
You can’t perform that action at this time.
0 commit comments