Skip to content

Commit

Permalink
Ensure HTTP connections are closed in websocket tests
Browse files Browse the repository at this point in the history
Differential Revision: https://phabricator.services.mozilla.com/D87494

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1653294
gecko-commit: 29be769939c2507fc75257e5bb09f067447eba47
gecko-integration-branch: autoland
gecko-reviewers: webdriver-reviewers, whimboo
  • Loading branch information
jgraham authored and moz-wptsync-bot committed Aug 21, 2020
1 parent 81e5ffd commit e949f1f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tools/webdriver/webdriver/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,8 @@ def start(self):
if self.session_id is not None:
return

self.transport.close()

body = {"capabilities": {}}

if self.requested_capabilities is not None:
Expand All @@ -452,6 +454,7 @@ def end(self):
pass
finally:
self.session_id = None
self.transport.close()

def send_command(self, method, url, body=None, timeout=None):
"""
Expand Down

0 comments on commit e949f1f

Please sign in to comment.