Subject: | Calling close() from mux_outbuffer_empty |
There seems to be a bug in IO::Multiplex when trying to call close() inside a mux_outbuffer_empty function. The call removes the filehandle, but it is readded (unintentionally, I beleive), inside the loop in IO::Multiplex. The attached patch file fixes the problem.
--- configd/IO/Multiplex2.pl Fri Apr 2 15:35:11 2004
+++ configd/IO/Multiplex.pm Thu Apr 1 19:19:31 2004
@@ -703,7 +703,9 @@
$obj->mux_outbuffer_empty($self, $fh)
if ($obj && $obj->can("mux_outbuffer_empty"));
- if ($self->{_fhs}{"$fh"}{shutdown}) {
+ if ($self->{_fhs}{"$fh"}
+ && $self->{_fhs}{"$fh"}{shutdown})
+ {
# If we've been marked for shutdown after write
# do it.
shutdown($fh, 1);