zD12 / pircbotx

Automatically exported from code.google.com/p/pircbotx
0 stars 0 forks source link

Rewrite Reconnect Routine #207

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Currently the reconnect routine seems rather brainless, if you will. Perhaps a 
new one will suit us better? With the following options:

Bot.IgnoreServerERR (Such as Kills and such) (Default true, will stop 
autoreconnect)
Bot.setAutoReconnectInterval(How long before attempts) (Default maybe 10 
seconds?)
Bot.setAutoReconnectAttempts(How many attempts) (Default maybe 2-3? Or an 
Infinite loop?)
Bot.isConnected (To see if the bot is connected to a network, to allow runtime 
disconnecting and connecting of bots from networks using commands)

Original issue reported on code.google.com by jzhou2...@gmail.com on 3 Nov 2014 at 6:29

GoogleCodeExporter commented 9 years ago
The connect/shutdown code has gone through many revisions and is probably the 
most brittle part. 

Going through your list though
 - G-Lines, Kills, and Errors are un-ignorable. They are quickly followed by the server closing the socket. 
 - setAutoReconnectInterval and setAutoReconnectAttempts - That sounds perfect for the config class. I'll get those in soon
 - Bot.isConnected - already implemented

Original comment by Lord.Qua...@gmail.com on 3 Nov 2014 at 6:38

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I meant ignore in the sense, it treats it the same as a ping timeout, or a 
failed connect. OR if 'unignored' it stops connecting upon finding a 
KILL/GLine/ERR.

Original comment by jzhou2...@gmail.com on 3 Nov 2014 at 7:37

GoogleCodeExporter commented 9 years ago
Issue 171 has been merged into this issue.

Original comment by Lord.Qua...@gmail.com on 6 Nov 2014 at 12:06

GoogleCodeExporter commented 9 years ago
I've added the methods and tested them, snapshot is currently building

Original comment by Lord.Qua...@gmail.com on 25 Nov 2014 at 10:26