Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Net::Server::Multiplex - how to safe close client connection?

by ph0enix (Friar)
on Apr 29, 2004 at 14:51 UTC ( [id://349151]=note: print w/replies, xml ) Need Help??


in reply to Net::Server::Multiplex - how to safe close client connection?

It seems to be ok if shutdown is used instead of remove and close.

for $h ($mux->handles()) { if ($fhs->{$h}{object}{user}{_id} == $id) { $mux->shutdown($h, 2); last; } }

One is not supposed to modify arrays while they are being iterated over. There was problem because freed value used in iteration in $mux->loop, so the perl saw freed value and segfault.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://349151]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2024-06-19 14:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.