Skip to content

Commit

Permalink
fixed error causing command timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoshi-E committed Jul 31, 2019
1 parent e4b4a87 commit 01fc372
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bec_rcon.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,10 @@ async def waitForResponse(self):
for i in range(0,timeout):
if(d < len(self.serverCommandData)): #new command package was received
self.sendLock = False #release the lock
return self.serverCommandData.pop()[1]
data = self.serverCommandData.pop()[1]
if(len(self.serverCommandData) >= self.serverCommandData.maxlen/2):
self.serverCommandData.clear()
return data
await asyncio.sleep(0.1)
if(self.options['debug']):
print("Failed to keep connection - Disconnected")
Expand Down

0 comments on commit 01fc372

Please sign in to comment.