diff --git a/pkg/scan/socks5/socks5.go b/pkg/scan/socks5/socks5.go index 09c372b..bd683d9 100644 --- a/pkg/scan/socks5/socks5.go +++ b/pkg/scan/socks5/socks5.go @@ -77,9 +77,10 @@ func (s *Scanner) Scan(ctx context.Context, r *scan.Request) (result scan.Result return } defer conn.Close() - // tell the operating system to discard any unsent or unacknowledged data on Close() - // it will release all socket resources and send RST packet, fine for the scan - if err = conn.(*net.TCPConn).SetLinger(0); err != nil { + // tell the operating system to discard any unsent or unacknowledged data on Close(), + // after a maximum of 1 second it will release all socket resources and send RST packet, + // fine for the scan + if err = conn.(*net.TCPConn).SetLinger(1); err != nil { return }