projects
/
spider.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
28b4b03
)
try harder to get clean disconnects
author
Dirk Koopman
<djk@tobit.co.uk>
Thu, 10 Aug 2017 11:13:05 +0000
(12:13 +0100)
committer
Dirk Koopman
<djk@tobit.co.uk>
Thu, 10 Aug 2017 11:13:05 +0000
(12:13 +0100)
Changes
patch
|
blob
|
history
perl/Msg.pm
patch
|
blob
|
history
diff --git
a/Changes
b/Changes
index 6ff0e8728944a809ae4d87adb9f004729dd0d086..d17fa120d0f965437de2c7ff89fe4b76a8a0e618 100644
(file)
--- a/
Changes
+++ b/
Changes
@@
-1,3
+1,5
@@
+10Aug17=======================================================================
+1. check for disconnecting flag in more places
31Jul17=======================================================================
1. Fixed create_usdb.pl path specifications
2. add CTY-2708 prefixes
31Jul17=======================================================================
1. Fixed create_usdb.pl path specifications
2. add CTY-2708 prefixes
diff --git
a/perl/Msg.pm
b/perl/Msg.pm
index bad84a2c4f2277d7b117999f5fbe7e55e6aa9a16..df4edd3606f0d90ae1faaf3bf07415e2ed50d558 100644
(file)
--- a/
perl/Msg.pm
+++ b/
perl/Msg.pm
@@
-136,8
+136,8
@@
sub _on_connect
undef $conn->{sock};
my $sock = $conn->{sock} = Mojo::IOLoop::Stream->new($handle);
$sock->on(read => sub {$conn->_rcv($_[1]);} );
undef $conn->{sock};
my $sock = $conn->{sock} = Mojo::IOLoop::Stream->new($handle);
$sock->on(read => sub {$conn->_rcv($_[1]);} );
- $sock->on(error => sub {$conn->disconnect;});
- $sock->on(close => sub {$conn->disconnect;});
+ $sock->on(error => sub {
delete $conn->{sock};
$conn->disconnect;});
+ $sock->on(close => sub {
delete $conn->{sock};
$conn->disconnect;});
$sock->timeout(0);
$sock->start;
$conn->{peerhost} = eval { $handle->peerhost; };
$sock->timeout(0);
$sock->start;
$conn->{peerhost} = eval { $handle->peerhost; };