I'm working on Client-Server simulation in Java where Clients (threads) are connecting to server to get some data. After several seconds, one of randomly chosen client (thread) needs to be killed. I close socket it used for communication to server and left him die (by exiting from run() method). Problem is when new created thread is trying to create same socket as previous one used (same addresses and same ports) to connect to server, I'm getting: I'm working on Client-Server simulation in Java