Socket not closing serverside when calling socket.close() in client JAVA
问题 I'm having problems with sockets in java. I have a ServerSocket that is listening with accept() and spawns threads for each client-request. Communication between clients and the server works fine. I am using an inputstream to read data from clients in the serverthreads, like: inputStream = mySocket.getInputStream(); bytes = inputStream.read(buffer); My problem is that if I call socket.close() from the clients, nothing happens to the blocking call of bytes = inputStream.read(buffer); , it