[fix] Since the batching code the TcpServer wasn't being shut down correctly after a node dropped out. This was already addressed in the trunk. It's now working here also. This also fixes the potential miscount on "messages-unsent" when a send fails in batch mode.