FluuxIO / go-xmpp

Native Go XMPP library
https://www.process-one.net/
BSD 3-Clause "New" or "Revised" License
317 stars 63 forks source link

Make keepalive interval configurable #134

Closed wichert closed 4 years ago

wichert commented 4 years ago

This fixes #133

wichert commented 4 years ago

FWIW I can't reproduce the test failure locally. Is that a heisenbug?

remicorniere commented 4 years ago

I have the same problem on my latest PR. I think it's a concurrency issue, and I'll try to fix the tests. I'll message you here once I get it fixed.

wichert commented 4 years ago

@mremond @remicorniere Can this be merged?

remicorniere commented 4 years ago

Yes !

remicorniere commented 4 years ago

@wichert Regarding the test bug, I finally got it working. Basically Decoder "objects" were not used appropriately in the tests and mock server. Sometimes we would have two decoders open on a single TCP connection. When that happened, and since Decoder has internal buffering and silently discards invalid documents, we would lose part of messages between decoders and just discard the other parts in other decoders. This would lead some tests to fail. It is fixed now with #135

wichert commented 4 years ago

That sounds like it was painful to debug!