mirror of
https://opendev.org/x/pyghmi
synced 2026-03-29 06:13:30 +00:00
Fix session reuse stall for async usage
Previously, calling code had to manually force an event loop iteration after making an asynchronous session creation request. Address that by making a non blocking iteration request happen automatically. Change-Id: I64f814401cb5ac397ac9ca4a1ae1d434976a2b01
This commit is contained in:
@@ -318,6 +318,9 @@ class Session(object):
|
||||
self.logonwaiters.append(onlogon)
|
||||
else:
|
||||
self.iterwaiters.append(onlogon)
|
||||
# Induce an immediate iteration of the event loop
|
||||
# so that these handlers get the information they are hoping for
|
||||
Session.wait_for_rsp(0)
|
||||
return
|
||||
self.maxtimeout = 3 # be aggressive about giving up on initial packet
|
||||
self.incommand = False
|
||||
|
||||
Reference in New Issue
Block a user