From 1efbd6de5e788bbb424602edd6321a0cba79bb04 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sun, 25 Mar 2018 14:03:04 +0200 Subject: ChromeService: Close listening socket MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We passed it to the child and don’t need it any more. --- crocoite/browser.py | 1 + 1 file changed, 1 insertion(+) (limited to 'crocoite') diff --git a/crocoite/browser.py b/crocoite/browser.py index b4ade56..4fe37d8 100644 --- a/crocoite/browser.py +++ b/crocoite/browser.py @@ -325,6 +325,7 @@ def ChromeService (binary='google-chrome-stable', host='localhost', port=9222, w p = subprocess.Popen (args, pass_fds=[s.fileno()], start_new_session=True, stdin=subprocess.DEVNULL, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) + s.close () # must be wrapped in try-finally, otherwise code in __exit__/finally is not # executed -- cgit v1.2.3