-MASTER- added an if to control if channel is closed in TCPConnectionHandler.