Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Attempt to reconnect on error in example code (untested)

  • Loading branch information...
commit 4389d0da1d8b9529d13d13d9f877e407c5e6ffd9 1 parent ec33dc4
Sanko Robinson authored
Showing with 1 addition and 3 deletions.
  1. +1 −3 examples/client.pl
4 examples/client.pl
View
@@ -1,6 +1,4 @@
#!/usr/bin/perl -I../lib
-use strict;
-use warnings;
use AnyEvent;
use AnyEvent::MSN;
use 5.012;
@@ -30,7 +28,7 @@
on_error => sub {
my ($msn, $msg, $fatal) = @_;
warn ucfirst sprintf '%serror: %s', ($fatal ? 'fatal ' : ''), $msg;
- $cv->send if $fatal;
+ $fatal? $cv->send : $msn->connect
}
);
$cv->recv;
Please sign in to comment.
Something went wrong with that request. Please try again.