Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge pull request #6 from hirose31/retry-reconnect

Retry reconnect
  • Loading branch information...
commit 1bcddf740151cc59fbe3da84699fa162cb7e7b83 2 parents ef546ba + 2036a63
Kazuhiro Osawa authored February 24, 2012

Showing 1 changed file with 6 additions and 3 deletions. Show diff stats Hide diff stats

  1. 9  bin/ikachan
9  bin/ikachan
@@ -57,10 +57,13 @@ my $create_session; $create_session = sub {
57 57
         on_connect => sub {
58 58
             my ($con, $err) = @_;
59 59
             if (defined $err) {
60  
-                die "connect error: $err\n";
  60
+                warn "connect error: $err\n";
  61
+                sleep 3;
  62
+                $con->disconnect('try reconnect');
  63
+            } else {
  64
+                warn 'connect';
  65
+                $is_connect      = 1;
61 66
             }
62  
-            warn 'connect';
63  
-            $is_connect      = 1;
64 67
         },
65 68
         on_disconnect => sub {
66 69
             warn 'disconnect';

0 notes on commit 1bcddf7

Please sign in to comment.
Something went wrong with that request. Please try again.