Smack Websocket Implementation does not parse close nonza

Smack version 4.5.0-alpha1-SNAPSHOT (4.3.4-856-g0a6c21982±master 2020-09-11)

When calling disconnect() on ModularXmppClientToServerConnection, we see it is sending a

<close xmlns='urn:ietf:params:xml:ns:xmpp-framing'/>

The server immediately sends a response nonza:

<close xmlns="urn:ietf:params:xml:ns:xmpp-framing" version="1.0">
    </close>

However, there is no code that recognizes or handles this nonza:

E/AbstractXMPPConnection: Unknown nonza: {urn:ietf:params:xml:ns:xmpp-framing}close

As a result, the blocking call times out with the following:

I/AbstractXMPPConnection: Exception while waiting for closing stream element from the server ModularXmppClientToServerConnection[5e7e03fb3cf2691e4ab3b90f@jon-hjelle-softphone-3mleqtg8kqs.orgspan.com/97121157-8b9e-46cd-a76e-d1197dd059f9] (0)
    org.jivesoftware.smack.SmackException$NoResponseException: No response received within reply timeout. Timeout was 10000ms (~10s). While waiting for closing stream tag from the server 
[ModularXmppClientToServerConnection[<jid>/97121157-8b9e-46cd-a76e-d1197dd059f9] (0)]
        at org.jivesoftware.smack.AbstractXMPPConnection.waitForConditionOrConnectionException(AbstractXMPPConnection.java:734)
        at org.jivesoftware.smack.AbstractXMPPConnection.waitForConditionOrThrowConnectionException(AbstractXMPPConnection.java:739)
        at org.jivesoftware.smack.AbstractXMPPConnection.waitForClosingStreamTagFromServer(AbstractXMPPConnection.java:1026)
        at org.jivesoftware.smack.c2s.ModularXmppClientToServerConnection.access$3100(ModularXmppClientToServerConnection.java:89)
        at org.jivesoftware.smack.c2s.ModularXmppClientToServerConnection$ShutdownState.transitionInto(ModularXmppClientToServerConnection.java:950)
        at org.jivesoftware.smack.c2s.ModularXmppClientToServerConnection.attemptEnterState(ModularXmppClientToServerConnection.java:420)
        at org.jivesoftware.smack.c2s.ModularXmppClientToServerConnection.walkStateGraphInternal(ModularXmppClientToServerConnection.java:326)
        at org.jivesoftware.smack.c2s.ModularXmppClientToServerConnection.walkStateGraph(ModularXmppClientToServerConnection.java:292)
        at org.jivesoftware.smack.c2s.ModularXmppClientToServerConnection.shutdown(ModularXmppClientToServerConnection.java:493)
        at org.jivesoftware.smack.c2s.ModularXmppClientToServerConnection.shutdown(ModularXmppClientToServerConnection.java:467)
        at org.jivesoftware.smack.AbstractXMPPConnection.disconnect(AbstractXMPPConnection.java:974)

So only after a ten second timeout after calling disconnect() is my connectionClosed() handler called.

Duplicate of

This topic was automatically closed 62 days after the last reply. New replies are no longer allowed.