diff --git a/prog/client_config.py.example b/prog/client_config.py.example index ea5276d05df97afba5c53cb090b9c932f559c459..f1400ac7bffb5d00cb06621955c9543576a85a09 100644 --- a/prog/client_config.py.example +++ b/prog/client_config.py.example @@ -7,9 +7,9 @@ c = None async def get_communication(): # This function must return communication.MainServer connected to your server # Multiple calls to this function should return the same connection - global c - cmd='ssh jr@externalArch.jk.dyn.blatto.eu /mnt/jr/jr/prog/run_py server.py' - socket = await communication.SSHRunSocket().connect(cmd) - c = communication.MainServer(socket) + if c: + cmd='ssh jr@externalArch.jk.dyn.blatto.eu /mnt/jr/jr/prog/run_py server.py' + socket = await communication.SSHRunSocket().connect(cmd) + c = communication.MainServer(socket) return c