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 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits