aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Net/IMAP
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2015-07-27 22:49:07 +0200
committerGuilhem Moulin <guilhem@fripost.org>2015-07-27 23:48:06 +0200
commit2a3287ab0b04341adcb8187b75cf35ac3f07d24f (patch)
tree6a05a21524005e92a09d4646dcf756fd2247df6c /lib/Net/IMAP
parent66b0682010cf24a4d2e92465dd57bcd795d21970 (diff)
bugfix: Don't exist with the children's exist status upon error.
Diffstat (limited to 'lib/Net/IMAP')
-rw-r--r--lib/Net/IMAP/Sync.pm5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Net/IMAP/Sync.pm b/lib/Net/IMAP/Sync.pm
index c1bccbf..677f991 100644
--- a/lib/Net/IMAP/Sync.pm
+++ b/lib/Net/IMAP/Sync.pm
@@ -386,9 +386,8 @@ sub new($%) {
# Log out when the Net::IMAP::Sync object is destroyed.
sub DESTROY($) {
my $self = shift;
- if (defined $self->{STDIN} and $self->{STDIN}->opened() and
- defined $self->{STDOUT} and $self->{STDOUT}->opened()) {
- $self->logout();
+ foreach (qw/STDIN STDOUT/) {
+ $self->{$_}->close() if defined $self->{$_} and $self->{$_}->opened();
}
}