Fixing concurrency issue in TCP EventClient buy reducing the  outputStream.write() method to one.