mirror of
https://opendev.org/x/pyghmi
synced 2026-05-13 18:04:19 +00:00
Correct pool usage count on failed login
If trying to establish a session and an error occurs, pyghmi was not decrementing the usage count on the pool, leading for more than expected filehandles being created over time. Fix this by correctly decrementing the count in the case where something is not yet broken, but is also not yet logged in. Change-Id: I1b27f9b3b902a253d38293182305cc4dac26b765
This commit is contained in:
@@ -403,6 +403,9 @@ class Session(object):
|
||||
del Session.bmc_handlers[sockaddr]
|
||||
if self.sol_handler:
|
||||
self.sol_handler({'error': 'Session Disconnected'})
|
||||
elif not self.broken:
|
||||
self.broken = True
|
||||
self.socketpool[self.socket] -= 1
|
||||
|
||||
def onlogon(self, parameter):
|
||||
if 'error' in parameter:
|
||||
|
||||
Reference in New Issue
Block a user