From 21f6cecb25fd771e195659ea3396b59b0ce91be4 Mon Sep 17 00:00:00 2001 From: William Lachance Date: Tue, 13 May 2014 17:52:51 -0400 Subject: [PATCH] Bug 1009862 - Close socket in devicemanagerSUT on timeout. r=gbrown --- testing/mozbase/mozdevice/mozdevice/devicemanagerSUT.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testing/mozbase/mozdevice/mozdevice/devicemanagerSUT.py b/testing/mozbase/mozdevice/mozdevice/devicemanagerSUT.py index 3c25e39c19a4..7410836985a0 100644 --- a/testing/mozbase/mozdevice/mozdevice/devicemanagerSUT.py +++ b/testing/mozbase/mozdevice/mozdevice/devicemanagerSUT.py @@ -242,6 +242,8 @@ class DeviceManagerSUT(DeviceManager): errStr = 'connection closed' timer += select_timeout if timer > timeout: + self._sock.close() + self._sock = None raise DMError("Automation Error: Timeout in command %s" % cmd['cmd'], fatal=True) except socket.error, err: socketClosed = True