Browse Source

tetris: fixed socket connection

feature/balanceutils
informaniac 7 years ago
parent
commit
b778375165
  1. 2
      games/ttrs.py

2
games/ttrs.py

@ -467,7 +467,7 @@ if __name__ == '__main__':
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
host, port = args.balance.split(':') host, port = args.balance.split(':')
try: try:
sock.connect(host, port) sock.connect((host, int(port)))
except ConnectionRefusedError: except ConnectionRefusedError:
print('could not connect to balance server', file=sys.stderr) print('could not connect to balance server', file=sys.stderr)
sys.exit(1) sys.exit(1)

Loading…
Cancel
Save