Dear monks. I am having a problem with a multiplexer i am writing, and i cannot seem to fin out what causes it. The error+message is "send: Cannot determine peer address at ./toritv.pl line 183". I've dumped the data to find out what the related variables are storing at the time of the crash, but i am not enlightened enhough to find the error. It should be added that this bu did not occur while the script was running on a FreeBSD 6.1 machine, but now that it is running on Linux 2.6.9 that bug has started to appear.
Here is the code in question:
#======== toritv.pl ===================
foreach $client ($select->can_write(1)) {
# Skip this client if we have nothing to say
next unless exists $outbuffer{$client};
$rv = $client->send($outbuffer{$client}, 0); # <-- this is where it crashes
unless (defined $rv) {
warn "I was told I could write, but I can't.\n";
next;
}
# lots of code goes here...
}