[Lldb-commits] [lldb] r254026 - swig-bot - Close the socket when shutting down.
Zachary Turner via lldb-commits
lldb-commits at lists.llvm.org
Tue Nov 24 13:35:58 PST 2015
Author: zturner
Date: Tue Nov 24 15:35:58 2015
New Revision: 254026
URL: http://llvm.org/viewvc/llvm-project?rev=254026&view=rev
Log:
swig-bot - Close the socket when shutting down.
Modified:
lldb/trunk/scripts/swig_bot_lib/client.py
Modified: lldb/trunk/scripts/swig_bot_lib/client.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/swig_bot_lib/client.py?rev=254026&r1=254025&r2=254026&view=diff
==============================================================================
--- lldb/trunk/scripts/swig_bot_lib/client.py (original)
+++ lldb/trunk/scripts/swig_bot_lib/client.py Tue Nov 24 15:35:58 2015
@@ -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
More information about the lldb-commits
mailing list