mirror of
https://github.com/r4sas/py-i2phosts
synced 2025-02-08 12:54:23 +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 datetime
|
||||||
import configobj
|
import configobj
|
||||||
import socket
|
import socket
|
||||||
|
import time
|
||||||
|
|
||||||
# parse command line options
|
# parse command line options
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
@ -73,6 +74,7 @@ s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
|||||||
try:
|
try:
|
||||||
s.connect((bob_ip, int(bob_port)))
|
s.connect((bob_ip, int(bob_port)))
|
||||||
# just receive BOB's greeting
|
# just receive BOB's greeting
|
||||||
|
time.sleep(1)
|
||||||
data = s.recv(512)
|
data = s.recv(512)
|
||||||
# make file object
|
# make file object
|
||||||
f = s.makefile('r')
|
f = s.makefile('r')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user