protected ConcurrentLinkedQueue<NioChannel> nioChannels = new ConcurrentLinkedQueue<NioChannel>() {
public boolean offer(NioChannel o) {
- if ( getSecure() ) return false;
//avoid over growing our cache or add after we have stopped
if ( running && (size() < curThreads) ) return super.offer(o);
else return false;
// Wait for polltime before doing anything, so that the poller threads
// exit, otherwise parallel descturction of sockets which are still
// in the poller can cause problems
+ close = true;
try {
synchronized (this) {
- this.wait(pollTime / 1000);
+ this.wait(selectorTimeout * 2);
}
} catch (InterruptedException e) {
// Ignore
handshake = socket.handshake(key.isReadable(), key.isWritable());
}catch ( IOException x ) {
handshake = -1;
- log.error("Error during SSL handshake",x);
+ if ( log.isDebugEnabled() ) log.debug("Error during SSL handshake",x);
}catch ( CancelledKeyException ckx ) {
handshake = -1;
}