New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Websocket closed after some time #65
Comments
installed using pip / pypi arandomnewaccount: |
Thanks, just reinstalled using git, will see how it goes :) |
I am having the same issue... socket seems to close in under an hour. I upgraded to 1.2.1 but no better arandomnewaccount: |
It may be due to this not being handled correctly:
This is from the heartbeat section in the developer docs. I don't recall seeing this in the documentation before, but I may be wrong. Nothing in the changelog hints it was added. In any case, if the gateway is sending more than one "HELLO" event, the handling for it needs to be reworked so that it doesn't collide with the current heartbeat thread. arandomnewaccount: However, it's still important that you, @akbar-amin, bring that up. Also, multiple hello events would be.....weird. But eh ig anythings possible with discord's weird api. I'll be on the lookout for On a side note, I know that gateway reconnections should depend on close codes. The reason they haven't for discum so far is because websocket-client was not sending back any close codes. This seemed to have changed yesterday (websocket-client/websocket-client#686), so I'll be doing some tests and hopefully, finally, making the reconnection handling mimic the official client. |
Running Python 3.8.5 Not sure if this is what you're looking for... log set to True I don't have it trying to close or anything, I'm just using it to read all messages as they come up, filter the ones from specific categories and forward them to a telegram so I can see them all in one place. I've worked around it by just placing the whole program in a while True loop so that as soon as it disconnects, it reinitializes the client and continues on arandomnewaccount: |
I believe my app is also breaking when this happens so as soon as the websocket closes then im suck in a infinite send loop arandomnewaccount: |
Python 3.8.5 and disum 1.2.1 arandomnewaccount: |
Been running my selfbot for 24 hours I think the issue has been fixed with the changes to gateway.py nice ok. I've also been running bot.gateway.run() on my end for the past ~1.5 days and it's been running smoothly. edit: still running a version on my end and it's been running smoothly. I'll be closing this issue - feel free to open up another one if gateway reconnection issues arise when using the most up-to-date version of discum. |
When running the script for a few hours, the log says websocket closed and the script exits. What could be causing this and is there a known solution?
Thanks!
arandomnewaccount:
did you install from pypi or from the github repo?
The text was updated successfully, but these errors were encountered: