зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1681311 - Guard against unclean shutdown when closing socket in testing/marionette/client/marionette_driver/transport.py. r=marionette-reviewers,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D99438
This commit is contained in:
Родитель
5da968a1bf
Коммит
0380ff3d85
|
@ -305,8 +305,10 @@ class TcpTransport(object):
|
|||
if exc.errno not in (57, 107):
|
||||
raise
|
||||
|
||||
self._sock.close()
|
||||
self._sock = None
|
||||
if self._sock:
|
||||
# Guard against unclean shutdown.
|
||||
self._sock.close()
|
||||
self._sock = None
|
||||
|
||||
def __del__(self):
|
||||
self.close()
|
||||
|
|
Загрузка…
Ссылка в новой задаче