From cb1ba4adfb7667d577b7f91dfffed7286a8af05d Mon Sep 17 00:00:00 2001 From: Venky Date: Sun, 19 Apr 2015 04:02:34 +0530 Subject: [PATCH] Close socket after successful connect test. --- msmtp-offline | 1 + 1 file changed, 1 insertion(+) diff --git a/msmtp-offline b/msmtp-offline index 9d1d3cf..629315f 100755 --- a/msmtp-offline +++ b/msmtp-offline @@ -97,6 +97,7 @@ def accessible?(host, port, timeout = 2) socket.connect_nonblock(sockaddr) rescue Errno::EISCONN # Good news everybody, the socket is connected! + socket.close return true rescue # An unexpected exception was raised - the connection is no good.