|
@ -1,4 +1,6 @@ |
|
|
|
|
|
|
|
|
import java.io.BufferedReader; |
|
|
import java.io.BufferedReader; |
|
|
|
|
|
|
|
|
import java.io.IOException; |
|
|
import java.io.IOException; |
|
|
import java.io.InputStreamReader; |
|
|
import java.io.InputStreamReader; |
|
|
import java.io.OutputStreamWriter; |
|
|
import java.io.OutputStreamWriter; |
|
@ -38,10 +40,10 @@ public class ClientHandler implements Runnable { |
|
|
message = fromClientReader.readLine(); |
|
|
message = fromClientReader.readLine(); |
|
|
} |
|
|
} |
|
|
} catch (IOException e) { |
|
|
} catch (IOException e) { |
|
|
e.printStackTrace(); |
|
|
|
|
|
|
|
|
throw new RuntimeException(e); |
|
|
|
|
|
|
|
|
} finally { |
|
|
} finally { |
|
|
//chatServer.removeClient(this); |
|
|
//chatServer.removeClient(this); |
|
|
throw new RuntimeException(e); |
|
|
|
|
|
chatServer.broadcastMessage(name + " disconnected."); |
|
|
chatServer.broadcastMessage(name + " disconnected."); |
|
|
|
|
|
|
|
|
if (fromClientReader != null) { |
|
|
if (fromClientReader != null) { |
|
|