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...
}
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.