File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
src/com/rabbitmq/client/impl Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -191,14 +191,16 @@ public boolean waitForConfirms()
191191 throws InterruptedException
192192 {
193193 synchronized (unconfirmedSet ) {
194- while ((unconfirmedSet .size () > 0 ) && (getCloseReason () == null ))
194+ while (true ) {
195+ if (getCloseReason () != null ) {
196+ throw Utility .fixStackTrace (getCloseReason ());
197+ }
198+ if (unconfirmedSet .isEmpty ()) {
199+ boolean noNacksReceived = !nacksReceived ;
200+ nacksReceived = false ;
201+ return noNacksReceived ;
202+ }
195203 unconfirmedSet .wait ();
196- if (unconfirmedSet .isEmpty ()) {
197- boolean noNacksReceived = !nacksReceived ;
198- nacksReceived = false ;
199- return noNacksReceived ;
200- } else {
201- throw Utility .fixStackTrace (getCloseReason ());
202204 }
203205 }
204206 }
You can’t perform that action at this time.
0 commit comments