1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-26 01:19:03 +00:00

Let imap and pop3 use shorter connect timeouts

This commit is contained in:
dmiller
2014-09-19 03:10:10 +00:00
parent 45ff211483
commit 791566faf0
2 changed files with 2 additions and 5 deletions

View File

@@ -93,9 +93,7 @@ IMAP = {
-- @return status true on success, false on failure
-- @return banner string containing the server banner
connect = function(self)
local socket, banner, opt = comm.tryssl( self.host, self.port, "", { recv_before = true } )
if ( not(socket) ) then return false, "ERROR: Failed to connect to server" end
socket:set_timeout(self.timeout)
local socket, banner, opt = comm.tryssl( self.host, self.port, "", { request_timeout=self.timeout, recv_before=true } )
if ( not(socket) or not(banner) ) then return false, "ERROR: Failed to connect to server" end
self.socket = socket
return true, banner