Quantcast
Channel: Ignite Realtime : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 10742

Reconnection and Roster

$
0
0

hi Flow and all, when i lost xmpp connection dure to network disconnection or some reason i don't understand like below

 

<iq id='O8GCk-119' to='pubsub.mydomain' type='get'><query xmlns='http://jabber.org/protocol/disco#info' node='moments'></query></iq>

SENT (0): </stream:stream>

Exception writing closing stream element

java.net.SocketException: sendto failed: EPIPE (Broken pipe)

           at libcore.io.IoBridge.maybeThrowAfterSendto(IoBridge.java:499)

          at libcore.io.IoBridge.sendto(IoBridge.java:468)

           at java.net.PlainSocketImpl.write(PlainSocketImpl.java:507)

           at java.net.PlainSocketImpl.access$100(PlainSocketImpl.java:46)

          at java.net.PlainSocketImpl$PlainSocketOutputStream.write(PlainSocketImpl.java:269 )

           at java.io.OutputStreamWriter.flushBytes(OutputStreamWriter.java:167)

           at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:158)

           at java.io.BufferedWriter.flush(BufferedWriter.java:124)

          at org.jivesoftware.smack.util.ObservableWriter.flush(ObservableWriter.java:44)

           at org.jivesoftware.smack.PacketWriter.writePackets(PacketWriter.java:190)

           at org.jivesoftware.smack.PacketWriter.access$000(PacketWriter.java:40)

           at org.jivesoftware.smack.PacketWriter$1.run(PacketWriter.java:77)

Caused by: libcore.io.ErrnoException: sendto failed: EPIPE (Broken pipe)

           at libcore.io.Posix.sendtoBytes(Native Method)

           at libcore.io.Posix.sendto(Posix.java:155)

           at libcore.io.BlockGuardOs.sendto(BlockGuardOs.java:177)

           at libcore.io.IoBridge.sendto(IoBridge.java:466)

 

but when the connection restarts, it seems will clear all exiten Roster, and cause RosterListener's entriesDeleted called, i'm using rc2-SNAPSHOT-2014-05-06 and in Roster.java 's addUpdateEntry method, new roster entries(items) got after reconnection seems totally the same as they are before reconnection(which is the same indeed), and thus are neither belongs to Collection<String> addedEntries, Collection<String> updatedEntries and thus in addEntries method they all goes into List<String> toDelete and deleted.

 

what should i do to better perform reconnection? and although EPIPE don't cause disconnection very offen but how could i avoid that(pls tell me to post more logs if needed). Thanks!


Viewing all articles
Browse latest Browse all 10742

Trending Articles