projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
commit changes
[spider.git]
/
perl
/
Msg.pm
diff --git
a/perl/Msg.pm
b/perl/Msg.pm
index ae9c4c28699709a3f34a771d0062568f74323071..8be2fc1bf071d39dd464907de8397da7fdd27891 100644
(file)
--- a/
perl/Msg.pm
+++ b/
perl/Msg.pm
@@
-398,7
+398,9
@@
FINISH:
&{$conn->{eproc}}($conn, $!) if exists $conn->{eproc};
$conn->disconnect;
} else {
&{$conn->{eproc}}($conn, $!) if exists $conn->{eproc};
$conn->disconnect;
} else {
- $conn->dequeue if exists $conn->{msg};
+ unless ($conn->{disable_read}) {
+ $conn->dequeue if exists $conn->{msg};
+ }
}
}
}
}
@@
-444,6
+446,13
@@
sub close_all_clients
}
}
}
}
+sub disable_read
+{
+ my $conn = shift;
+ set_event_handler ($conn->{sock}, read => undef);
+ return $_[0] ? $conn->{disable_read} = $_[0] : $_[0];
+}
+
#
#----------------------------------------------------
# Event loop routines used by both client and server
#
#----------------------------------------------------
# Event loop routines used by both client and server