summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/swig_bot_lib
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2015-11-24 21:35:58 +0000
committerZachary Turner <zturner@google.com>2015-11-24 21:35:58 +0000
commit48102bd1864c49ffe44b4542b29f18ce0ec6387d (patch)
tree9a767c30b0e4da26f295c58f50e17038bea22cbe /lldb/scripts/swig_bot_lib
parent9befc01064c2ef73e3764b15426dce82dc5fbe52 (diff)
downloadbcm5719-llvm-48102bd1864c49ffe44b4542b29f18ce0ec6387d.tar.gz
bcm5719-llvm-48102bd1864c49ffe44b4542b29f18ce0ec6387d.zip
swig-bot - Close the socket when shutting down.
llvm-svn: 254026
Diffstat (limited to 'lldb/scripts/swig_bot_lib')
-rw-r--r--lldb/scripts/swig_bot_lib/client.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/lldb/scripts/swig_bot_lib/client.py b/lldb/scripts/swig_bot_lib/client.py
index feb23287931..6d21aaff4d9 100644
--- a/lldb/scripts/swig_bot_lib/client.py
+++ b/lldb/scripts/swig_bot_lib/client.py
@@ -161,8 +161,13 @@ def run(args):
else:
logging.info("swig bot client using remote generation with server '{}'"
.format(options.remote))
- config_json = config.generate_config_json(options)
- packed_input = local.pack_archive(config_json, options)
- connection = establish_remote_connection(options.remote)
- response = transmit_data(connection, packed_input)
- logging.debug("Received {} byte response.".format(len(response)))
+ connection = None
+ try:
+ config_json = config.generate_config_json(options)
+ packed_input = local.pack_archive(config_json, options)
+ connection = establish_remote_connection(options.remote)
+ response = transmit_data(connection, packed_input)
+ logging.debug("Received {} byte response.".format(len(response)))
+ finally:
+ if connection is not None:
+ connection.close() \ No newline at end of file
OpenPOWER on IntegriCloud