http://qs1969.pair.com?node_id=349151


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.