posted 13 years ago
Matthew is still right. Your connect() method contains a while (true) loop that only ends when an exception occurs, and therefore the entire method will only end when an exception occurs.
Other than that, you will overwrite reader and writer for every new connection. They should become local variables instead, which you then pass to the runnables:
Now each connection will have its own reader/writer pair and its own handling threads.