Skip to content

Commit 8d1509c

Browse files
author
Scott Tadman
committed
Better fix for nil#shutdown! error
1 parent b9ade05 commit 8d1509c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/net/sftp.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ def self.start(host, user, options={}, &block)
4040
sftp
4141
rescue Object => anything
4242
begin
43-
session and session.shutdown!
44-
rescue Exception
43+
session.shutdown!
44+
rescue ::Exception
4545
# swallow exceptions that occur while trying to shutdown
4646
end
4747

0 commit comments

Comments
 (0)