Restore sane timeout behavior to pyghmi

The change to make sure resources are freed replaced straightforward
message with a weird one.  In the well known context, put the well known
message back in the reasonable path.

Change-Id: Iea17b8bbb7b14255debb05a90d5701f320b5d705
This commit is contained in:
Jarrod Johnson 2023-09-20 15:20:49 -04:00
parent b2f46dfdae
commit 8ac115a8a7
1 changed files with 3 additions and 0 deletions

View File

@ -592,6 +592,9 @@ class Session(object):
def onlogon(self, parameter):
if 'error' in parameter:
while self.logonwaiters:
waiter = self.logonwaiters.pop()
waiter(parameter)
self._mark_broken(parameter['error'])
elif self.onlogpayload:
self._cmdwait()