Browse Source

py-i2phosts-checker: add delay to receive BOB's greeting

Without this delay we're getting BOB's greeting later when expecting
lookup results.
pull/1/head
Hidden Z 11 years ago
parent
commit
ce5ccb5ed8
  1. 2
      bin/py-i2phosts-checker

2
bin/py-i2phosts-checker

@ -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…
Cancel
Save