246247248249250251252253254255256
send(new ProtocolHeader(1, 0, 10)); Waiter w = new Waiter(lock, timeout); while (w.hasTime() && state == OPENING && error == null) { w.await(); } if (error != null) { ConnectionException t = error;
336337338339340341342343344345346
synchronized (lock) { Waiter w = new Waiter(lock, timeout); while (w.hasTime() && state != OPEN && error == null) { w.await(); } if (state != OPEN) { throw new ConnectionException("Timed out waiting for connection to be ready. Current state is :" + state);
244245246247248249250251252253254
319320321322323324325326327328329
596597598599600601602603604605606
state = CLOSING; connectionClose(replyCode, replyText, _options); Waiter w = new Waiter(lock, timeout); while (w.hasTime() && state == CLOSING && error == null) { w.await(); } if (error != null) { close(replyCode, replyText, _options);
625626627628629630631632633634635
{ sender.close(); w = new Waiter(lock, timeout); while (w.hasTime() && sender != null && error == null) { w.await(); } if (error != null) { throw new ConnectionException(error);
588589590591592593594595596597598
617618619620621622623624625626627
321322323324325326327328329330331