if (closing || closed) {
handler.completed(Integer.valueOf(-1), attachment);
return;
}
if (readPending) {
throw new ReadPendingException();
} else {
readPending = true;
}
if (!handshakeComplete) {
throw new IllegalStateException(sm.getString("channel.nio.ssl.incompleteHandshake"));