From ce5ccb5ed848da34a3a36f51215251ee9e048ea1 Mon Sep 17 00:00:00 2001 From: Hidden Z Date: Thu, 26 Sep 2013 16:44:03 +0000 Subject: [PATCH] py-i2phosts-checker: add delay to receive BOB's greeting Without this delay we're getting BOB's greeting later when expecting lookup results. --- bin/py-i2phosts-checker | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/py-i2phosts-checker b/bin/py-i2phosts-checker index b65afda..55af59b 100755 --- a/bin/py-i2phosts-checker +++ b/bin/py-i2phosts-checker @@ -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')