Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

sleep and retry to reconnect when failed to connect IRC server.

  • Loading branch information...
commit 2036a6371dfabb995b039d3e824d491ea82f493c 1 parent 4b565a3
@hirose31 hirose31 authored
Showing with 5 additions and 3 deletions.
  1. +5 −3 bin/ikachan
View
8 bin/ikachan
@@ -58,10 +58,12 @@ my $create_session; $create_session = sub {
my ($con, $err) = @_;
if (defined $err) {
warn "connect error: $err\n";
- exit 1;
+ sleep 3;
+ $con->disconnect('try reconnect');
+ } else {
+ warn 'connect';
+ $is_connect = 1;
}
- warn 'connect';
- $is_connect = 1;
},
on_disconnect => sub {
warn 'disconnect';
Please sign in to comment.
Something went wrong with that request. Please try again.