My code is this:
while 1: # Determine whether the server is up or down try: s.connect((mcip, port)) s.send(magic) data = s.recv(1024) s.close() print data except Exception, e: print e sleep(60)
It works fine on the first run, but gives me Errno 9 every time after. What am I doing wrong?
mcip = "mau5ville.com" port = 25565 magic = "\xFE"