Update TCPServer.java

add socket close event handler