/// <summary> /// Releases the channel to its pool. /// </summary> public virtual void release() { lock (this) { log.Debug("Release [" + ch.Id + "]"); if (!closed) { if (!released) { /* * NB * It seems that Netty closes a channel if it is released twice! */ released = true; pool.ReleaseAsync(ch); } } } }