Commit f090ec80 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gaston

Stop the thread and do nothing else if the socket is closed.


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@672 b35dd754-fafc-0310-a699-88a17e54d16e
parent 872eab11
...@@ -16,6 +16,8 @@ import java.io.IOException; ...@@ -16,6 +16,8 @@ import java.io.IOException;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.io.Writer; import java.io.Writer;
import java.net.Socket; import java.net.Socket;
import java.net.SocketException;
import org.dom4j.Document; import org.dom4j.Document;
import org.dom4j.Element; import org.dom4j.Element;
import org.dom4j.io.XPPPacketReader; import org.dom4j.io.XPPPacketReader;
...@@ -111,6 +113,10 @@ public class SocketReadThread extends Thread { ...@@ -111,6 +113,10 @@ public class SocketReadThread extends Thread {
catch (EOFException eof) { catch (EOFException eof) {
// Normal disconnect // Normal disconnect
} }
catch (SocketException se) {
// The socket was closed. The server may close the connection for several reasons (e.g.
// user requested to remove his account). Do nothing here.
}
catch (XmlPullParserException ie) { catch (XmlPullParserException ie) {
// Check if the user abruptly cut the connection without sending previously an // Check if the user abruptly cut the connection without sending previously an
// unavailable presence // unavailable presence
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment