suicvne / DiscordSharp

A .Net API for Discord written in C#
MIT License
129 stars 33 forks source link

WebSocket randomly closing. #60

Open sb7766 opened 8 years ago

sb7766 commented 8 years ago

I'm using the current NuGet version at the time of writing this (0.6.2.0), and it seems that the websocket repeatedly closes itself every minute or two. No clue why it's doing this.

suicvne commented 8 years ago

i don't work on this too much nowadays but try the latest version from source. nuget hasn't been updated since april tbh

Dimitrias commented 8 years ago

I have the same issue, also with the latest version. Some people were asking in the discord api chat room about this as well.

ghost commented 8 years ago

Step 1 that fixed it for me was reducing the keep alive ping from 41500 to 15000 (41.5s to 15s)

foxbot commented 8 years ago

wouldn't reccomend lowering your heartbeat to 15s, discord specifies 41.5s for a reason. I'd deviate 5s off the reccomended heartbeat at max, going down to 15 might cause issues