parent
18be87d460
commit
8605f74d27
|
|
@ -22,7 +22,6 @@ import socket
|
||||||
import select
|
import select
|
||||||
import time
|
import time
|
||||||
import logging
|
import logging
|
||||||
import sys
|
|
||||||
|
|
||||||
from . import __version__, string_type, is_py3
|
from . import __version__, string_type, is_py3
|
||||||
from .parsing import parse
|
from .parsing import parse
|
||||||
|
|
@ -236,14 +235,6 @@ class IS(object):
|
||||||
|
|
||||||
self.sock.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1)
|
self.sock.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1)
|
||||||
|
|
||||||
if sys.platform not in ['cygwin', 'win32']:
|
|
||||||
# these things don't exist in socket under Windows
|
|
||||||
# pylint: disable=E1103
|
|
||||||
self.sock.setsockopt(socket.SOL_TCP, socket.TCP_KEEPIDLE, 15)
|
|
||||||
self.sock.setsockopt(socket.SOL_TCP, socket.TCP_KEEPCNT, 3)
|
|
||||||
self.sock.setsockopt(socket.SOL_TCP, socket.TCP_KEEPINTVL, 5)
|
|
||||||
# pylint: enable=E1103
|
|
||||||
|
|
||||||
banner = self.sock.recv(512)
|
banner = self.sock.recv(512)
|
||||||
if is_py3:
|
if is_py3:
|
||||||
banner = banner.decode('latin-1')
|
banner = banner.decode('latin-1')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue