<handshake/> packet after component authentication


I wrote xmpp server component using Whack. After successfull authentication server sends empty packet and Whack throws exception:

[Component socket reader] ERROR org.jivesoftware.whack.ExternalComponentManager - org.xmlpull.v1.XmlPullParserException: Unknown packet type was read: handshake
          at org.jivesoftware.whack.SocketReadThread.readStream(SocketReadThread.java:107)
          at org.jivesoftware.whack.SocketReadThread.run(SocketReadThread.java:61)

But in XEP-0114: Jabber Component Protocol — 3. Protocol Flow pointed:

If the credentials are acceptable, the receiving application (in this case the server) MUST return an empty element.

Thanks for paying attention.

P.S. I’m using tigase v5 server.

Grigory, you are right the component workflow as part of authenticating a component the server will send back an empty packet. However when I look at Whack’s (trunk) code I see that in order for authentication to have succeeded a **non error **packet needs to be received. I am guessing you are either: getting a “non error” packet (any valid xml packet, just root element is not error) or you are getting 2 packets.

I would run a wireshark or other trace to capture the data on the wire or add some logging / console out to Whack (externalComponent.connect(String host, int port, String subdomain))