fixed the tcp server to accept multiple connections.