private void informCloseListener() {
_log.info("Calling channelCloseListener");
// listener is nullified (under sync) to guarantee it is called only once
ChannelCloseListener tempListener = null;
synchronized (this) {
if(_closeListener != null) {
tempListener = _closeListener;
_closeListener = null;
}
}
if(tempListener != null)
tempListener.onChannelClose();
}