projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add better new user logging in PC92/PC19
[spider.git]
/
perl
/
AsyncMsg.pm
diff --git
a/perl/AsyncMsg.pm
b/perl/AsyncMsg.pm
index ff3b3bca07c01eae0c52afbc43a6cebfe08830c8..f8cd2f9f3b60bea14be79d24029a69049b685a9c 100644
(file)
--- a/
perl/AsyncMsg.pm
+++ b/
perl/AsyncMsg.pm
@@
-269,6
+269,7
@@
sub disconnect
if ($dxchan) {
no strict 'refs';
$ondisc->($conn, $dxchan);
if ($dxchan) {
no strict 'refs';
$ondisc->($conn, $dxchan);
+ delete $conn->{on_disconnect};
}
}
delete $conn->{mojo};
}
}
delete $conn->{mojo};
@@
-276,6
+277,19
@@
sub disconnect
$conn->SUPER::disconnect;
}
$conn->SUPER::disconnect;
}
+sub _send_later
+{
+ my $conn = shift;
+ my $m = shift;
+
+ if (isdbg('async')) {
+ my $s = $m;
+ $s =~ s/([\%\x00-\x1f\x7f-\xff])/sprintf("%%%02X", ord($1))/eg;
+ dbg("AsyncMsg: send $s");
+ }
+ $conn->send_later($m);
+}
+
sub DESTROY
{
my $conn = shift;
sub DESTROY
{
my $conn = shift;