Set connection flag in server.py instead