forked from OSchip/llvm-project
swig-bot - Close the socket when shutting down.
llvm-svn: 254026
This commit is contained in:
parent
9befc01064
commit
48102bd186
|
@ -161,8 +161,13 @@ def run(args):
|
||||||
else:
|
else:
|
||||||
logging.info("swig bot client using remote generation with server '{}'"
|
logging.info("swig bot client using remote generation with server '{}'"
|
||||||
.format(options.remote))
|
.format(options.remote))
|
||||||
config_json = config.generate_config_json(options)
|
connection = None
|
||||||
packed_input = local.pack_archive(config_json, options)
|
try:
|
||||||
connection = establish_remote_connection(options.remote)
|
config_json = config.generate_config_json(options)
|
||||||
response = transmit_data(connection, packed_input)
|
packed_input = local.pack_archive(config_json, options)
|
||||||
logging.debug("Received {} byte response.".format(len(response)))
|
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()
|
Loading…
Reference in New Issue