Skip to content

Commit

Permalink
Disconnect() - Close socket connection after logout
Browse files Browse the repository at this point in the history
Disconnect() now closes all connections from the stub's connection pool.

(cherry picked from commit 15c802dea99226262c34ba18f1aef443fd19f669)
  • Loading branch information
ddraganov committed Jul 8, 2022
1 parent 5a738be commit 095ac14
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions pyVim/connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ def Disconnect(si):
"""
# Logout
__Logout(si)
si._stub.DropConnections()
SetSi(None)


Expand Down
1 change: 1 addition & 0 deletions pyVmomi/SoapAdapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1612,6 +1612,7 @@ def __init__(self, soapStub, loginMethod, retryDelay=0.1, retryCount=4):

self.lock = threading.Lock()
self.soapStub = soapStub
self.DropConnections = soapStub.DropConnections
self.state = self.STATE_UNAUTHENTICATED

self.loginMethod = loginMethod
Expand Down

0 comments on commit 095ac14

Please sign in to comment.