added channel to close tcp server loop