Closed stuaxo closed 7 years ago
In the following bit of code do I need to explicitly call .close(), or will it happen because player_client goes out of scope ?
try: player_client = yield from aiozmq.rpc.connect_rpc( connect="tcp://%s:%s" % ("0.0.0.0", self.local_player_port), timeout=CLIENT_PLAYER_TIMEOUT) local_player.peer_token = peer_token yield from player_client.call.update_peer_token(self.local_player.token, peer_token) except asyncio.TimeoutError: # timeout TODO logger.error("Client > Player timeout") asyncio.ensure_future(call_update_peer_token())
You should close connections explicitly
In the following bit of code do I need to explicitly call .close(), or will it happen because player_client goes out of scope ?