mirror of
https://github.com/r4sas/py-i2phosts
synced 2025-02-02 01:44:40 +00:00
py-i2phosts-checker: add delay to receive BOB's greeting
Without this delay we're getting BOB's greeting later when expecting lookup results.
This commit is contained in:
parent
37e3e4a43e
commit
ce5ccb5ed8
@ -6,6 +6,7 @@ import argparse
|
||||
import datetime
|
||||
import configobj
|
||||
import socket
|
||||
import time
|
||||
|
||||
# parse command line options
|
||||
parser = argparse.ArgumentParser(
|
||||
@ -73,6 +74,7 @@ s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
try:
|
||||
s.connect((bob_ip, int(bob_port)))
|
||||
# just receive BOB's greeting
|
||||
time.sleep(1)
|
||||
data = s.recv(512)
|
||||
# make file object
|
||||
f = s.makefile('r')
|
||||
|
Loading…
x
Reference in New Issue
Block a user