Open JabLuszko opened 1 month ago
Not sure, haven't worked on this repo for a while and I don't have any plans on continuing it. Are you using a proxy? If it's consistently disconnecting after 8 seconds it would seem... weird? Maybe it's your connection? How are you using the library? Is your main program loop constantly running?
It's not disconnecting after 8 seconds - it takes around 1 minute from the start. / 8 second was note for me fiddling (decreasing) timer for PINGREQ just to make sure it's not hitting some funny 0.0002 seconds something edge-case/
Main program loop is running - it's not that. Plus it's FB servers closing connection - that 1000 Bye
comes from them, isn't it?
It's like that PINGREQ is not working... but there are PINGRESP? On the other hand that PINGRESP can be generate by sending anything - I've messed with a structure for testing and it was still giving PINGRESP even for some crazy packets :|
No proxy, no magic - direct connection.
Also if I send some chat messages while this connection last for that 1 minute it does not extend the 1 minute thing - I would assume chat messages should extend the time as connection is active or FB don't care about that and PING is everything? This also would suggest it's not some websocket internal (client side) timeout as those chat messages are getting sent and showing up.
msgBuilder := cli.Threads.NewMessageBuilder(threadId)
(...)
tableResp, err := msgBuilder.Execute()
If this is kinda abandoned do you know any other lib [whatever lang] that works with lightspeed
thing for FB chat?
I never had this issue, but I have heard of it before.
You can check out the updated messagix library (forked from this, not maintained by me) here.
Otherwise you can try to debug the issue by comparing the socket payloads in the library vs web connection, there is most likely something small that is different which you are missing
Quick log. The handshake data seems to be correct comparing to my browser. This is (re-)using cookies from webbrowser, but I made sure that it was closed for like 60 minutes if FB couldn't handle sessions or something.
Any idea what is happening? I've fiddled with intervals (up to 8 seconds) and socket timeouts - FB still closes connection.