diff --git a/pyghmi/ipmi/command.py b/pyghmi/ipmi/command.py index da431c06..ef8d3f55 100644 --- a/pyghmi/ipmi/command.py +++ b/pyghmi/ipmi/command.py @@ -87,6 +87,9 @@ class Command(object): onlogon=self.logged, port=port, kg=kg) + # induce one iteration of the loop, now that we would be + # prepared for it in theory + session.Session.wait_for_rsp(0) else: self.ipmi_session = session.Session(bmc=bmc, userid=userid, diff --git a/pyghmi/ipmi/console.py b/pyghmi/ipmi/console.py index 6c6c694f..92be4751 100644 --- a/pyghmi/ipmi/console.py +++ b/pyghmi/ipmi/console.py @@ -61,6 +61,9 @@ class Console(object): port=port, kg=kg, onlogon=self._got_session) + # induce one iteration of the loop, now that we would be + # prepared for it in theory + session.Session.wait_for_rsp(0) def _got_session(self, response): """Private function to navigate SOL payload activation diff --git a/pyghmi/ipmi/private/session.py b/pyghmi/ipmi/private/session.py index 43c59def..69dac31c 100644 --- a/pyghmi/ipmi/private/session.py +++ b/pyghmi/ipmi/private/session.py @@ -318,9 +318,6 @@ 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