} else {
future = pendingWrite.future;
}
MessageEvent encryptedWrite =
new DefaultMessageEvent(channel, future, msg, null);
if (Thread.holdsLock(pendingEncryptedWrites)) {
pendingEncryptedWrites.offer(encryptedWrite);
} else {
synchronized (pendingEncryptedWrites) {