Skip to content

Commit

Permalink
Work around Net::SSH2 socket bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
theory committed Jul 14, 2010
1 parent 7553a22 commit 012900b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
5 changes: 5 additions & 0 deletions lib/Bric/Changes.pod
Expand Up @@ -103,6 +103,11 @@ no longer expires those assets unless they are active and the
C<< <expire_date> >> element is set in the XML. Thanks to Nick Legg for the
report (Bug # 184). [David]

=item *

Worked around a bug in L<Net::SSH2> where sockets weren't being closed,
leading to L<bric_queued> running out of file descriptors. [David]

=back

=head1 Version 2.0.0 (2010-04-12)
Expand Down
9 changes: 3 additions & 6 deletions lib/Bric/Util/Trans/SFTP.pm
Expand Up @@ -34,18 +34,13 @@ use Net::SSH2::SFTP;
use Bric::Util::Fault qw(throw_gen);
use Bric::Util::Trans::FS;
use Bric::Config qw(:dist);
use Bric::Util::ApacheUtil qw(unescape_uri escape_uri);
use Bric::Util::ApacheUtil qw(unescape_uri);

################################################################################
# Inheritance
################################################################################
use base qw(Bric);

################################################################################
# Function and Closure Prototypes
################################################################################
my ($no_warn);

################################################################################
# Constants
################################################################################
Expand Down Expand Up @@ -181,6 +176,7 @@ sub put_res {
}

# Disconnect.
$ssh2->sock->close;
$ssh2->disconnect;
}
return 1;
Expand Down Expand Up @@ -239,6 +235,7 @@ sub del_res {
}

# Disconnect.
$ssh2->sock->close;
$ssh2->disconnect;
}
return 1;
Expand Down

0 comments on commit 012900b

Please sign in to comment.