14May01=======================================================================
1. fix problem with re-reading in db definitions for remote databases.
+2. try to prevent situations where two can (semi) successfully login, probably
+under load, and get a 'tried to connect whilst already connected' abort.
11May01=======================================================================
1. allow stat/msg on priv 1
07May01=======================================================================
&{$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};
+ }
}
}
}
}
+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
sub already_conn
{
my ($conn, $call, $mess) = @_;
-
+
+ $conn->disable_read(1);
dbg('chan', "-> D $call $mess\n");
$conn->send_now("D$call|$mess");
sleep(2);