Commit 01747627 authored by Guus der Kinderen's avatar Guus der Kinderen

OF-1042: Don't NPE when a session is already closed when processing </stream>.

parent 69ede3dd
...@@ -150,7 +150,9 @@ public abstract class StanzaHandler { ...@@ -150,7 +150,9 @@ public abstract class StanzaHandler {
// Verify if end of stream was requested // Verify if end of stream was requested
if (stanza.equals("</stream:stream>")) { if (stanza.equals("</stream:stream>")) {
session.close(); if (session != null) {
session.close();
}
return; return;
} }
// Ignore <?xml version="1.0"?> stanzas sent by clients // Ignore <?xml version="1.0"?> stanzas sent by clients
......
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