Fix: Connection disconnect_cb/error_cb were being called in the wrong order

Signed-off-by: Pedro Melo <melo@simplicidade.org>
This commit is contained in:
Pedro Melo
2014-07-20 19:48:57 +01:00
parent e57cf0cab0
commit 6e6265053e

View File

@@ -70,12 +70,12 @@ sub connect {
on_connect => sub { $self->_connected(@_) },
on_connect_error => sub {
$self->_disconnected;
$self->_log_error('(connect failed) ' . ($_[1] || $!));
$self->_disconnected;
},
on_error => sub {
$self->_disconnected;
$self->_log_error('(read error) ' . ($_[2] || $!));
$self->_disconnected;
},
on_eof => sub {
$self->_disconnected;