Skip to content

Commit

Permalink
Only stop watching the handles in the modes we've already watched them
Browse files Browse the repository at this point in the history
in, in case they happen to be duplicates of each other.
  • Loading branch information
rcaputo committed Oct 5, 2009
1 parent 8693d52 commit cd839fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/POE/Wheel/ReadWrite.pm
Expand Up @@ -389,12 +389,12 @@ sub DESTROY {
# Turn off the select. This is a problem if a wheel is being
# swapped, since it will turn off selects for the other wheel.
if ($self->[HANDLE_INPUT]) {
$poe_kernel->select($self->[HANDLE_INPUT]);
$poe_kernel->select_read($self->[HANDLE_INPUT]);
$self->[HANDLE_INPUT] = undef;
}

if ($self->[HANDLE_OUTPUT]) {
$poe_kernel->select($self->[HANDLE_OUTPUT]);
$poe_kernel->select_write($self->[HANDLE_OUTPUT]);
$self->[HANDLE_OUTPUT] = undef;
}

Expand Down

0 comments on commit cd839fa

Please sign in to comment.