aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/xmpp/s2s/ConnectionIn.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/juick/xmpp/s2s/ConnectionIn.java')
-rw-r--r--src/main/java/com/juick/xmpp/s2s/ConnectionIn.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/com/juick/xmpp/s2s/ConnectionIn.java b/src/main/java/com/juick/xmpp/s2s/ConnectionIn.java
index 8150cc27..f484c9db 100644
--- a/src/main/java/com/juick/xmpp/s2s/ConnectionIn.java
+++ b/src/main/java/com/juick/xmpp/s2s/ConnectionIn.java
@@ -5,12 +5,16 @@ import com.juick.xmpp.JID;
import com.juick.xmpp.Message;
import com.juick.xmpp.Presence;
import com.juick.xmpp.utils.XmlUtils;
+
+import java.io.EOFException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.Socket;
import java.util.ArrayList;
import java.util.UUID;
+import java.util.logging.Logger;
+
import org.xmlpull.v1.XmlPullParser;
/**
@@ -19,6 +23,8 @@ import org.xmlpull.v1.XmlPullParser;
*/
public class ConnectionIn extends Connection implements Runnable {
+ private static final Logger LOGGER = Logger.getLogger(ConnectionIn.class.getName());
+
final public ArrayList<String> from = new ArrayList<String>();
public long tsRemoteData = 0;
public long packetsRemote = 0;
@@ -137,6 +143,10 @@ public class ConnectionIn extends Connection implements Runnable {
System.err.println("STREAM " + streamID + " FINISHED");
XMPPComponent.removeConnectionIn(this);
closeConnection();
+ } catch (EOFException ex) {
+ LOGGER.info(String.format("STREAM %s CLOSED (dirty)", streamID));
+ XMPPComponent.removeConnectionIn(this);
+ closeConnection();
} catch (Exception e) {
System.err.println("STREAM " + streamID + " ERROR:" + e.toString());
e.printStackTrace();