meebey / SmartIrc4net

IRC C# Library
http://www.meebey.net/projects/smartirc4net/
Other
126 stars 52 forks source link

Auto retry never happens if exception is thrown #17

Open xPaw opened 10 years ago

xPaw commented 10 years ago
Exception: Could not connect to: kornbluth.freenode.net:8000 Connection refused
  at Meebey.SmartIrc4net.IrcConnection.Connect (System.String[] addresslist, Int32 port) [0x00000] in <filename unknown>:0
  at Meebey.SmartIrc4net.IrcClient.Connect (System.String[] addresslist, Int32 port) [0x00000] in <filename unknown>:0

This happened, and it never connected to any other server in the list.

xPaw commented 10 years ago

I guess it happened here: https://github.com/meebey/SmartIrc4net/blob/master/src/IrcConnection/IrcConnection.cs#L738

Which is a weird thing to do because there are plenty of servers in supplied server list which work.

meebey commented 10 years ago

I don't think it is line 738 because CouldNotConnectException is only thrown in the AuthenticationException block which only happens on SSL issue. Your message indicates a simple connection refused issue though. Are you sure you have enabled AutoRetry and AutoRetryLimit has at least the size of your supplied server list (the default is 3).

xPaw commented 10 years ago

Yep, autoretry is enabled with limit set to 0.

meebey commented 10 years ago

Please use a debug build then (which enables logging) and initialize the logger like this:https://github.com/meebey/smuxi/blob/0ebb3a385336867ddc8c685a4121553049c9218a/lib/win32/smuxi-frontend-gnome.exe.config with your application's .exe.config