set proto only if it was given
This commit is contained in:
parent
923dfa3532
commit
c87dbd63e2
1 changed files with 2 additions and 1 deletions
|
@ -239,7 +239,8 @@ class Treepuncher(
|
||||||
async def _work(self):
|
async def _work(self):
|
||||||
try:
|
try:
|
||||||
server_data = await self.info()
|
server_data = await self.info()
|
||||||
self.dispatcher.set_proto(server_data['version']['protocol'])
|
if "version" in server_data and "protocol" in server_data["version"]:
|
||||||
|
self.dispatcher.set_proto(server_data['version']['protocol'])
|
||||||
except Exception:
|
except Exception:
|
||||||
return self.logger.exception("exception while pinging server")
|
return self.logger.exception("exception while pinging server")
|
||||||
while self._processing:
|
while self._processing:
|
||||||
|
|
Loading…
Reference in a new issue