fix client to fail on SSL error

This commit is contained in:
Kenneth Giusti 2014-02-05 19:32:49 -05:00
parent f1b30a5c51
commit d01323432f

@ -131,6 +131,7 @@ class MyConnection(fusion.ConnectionEventHandler):
def connection_failed(self, connection, error):
LOG.error("Connection failed! error=%s" % str(error))
raise Exception("Connection failure: %s" % str(error))
def sender_requested(self, connection, link_handle,
requested_source, properties={}):
@ -357,8 +358,8 @@ def main(argv=None):
"my-target-address",
receiver_properties={},
sender_properties={})
try:
my_connection.connect(my_socket)
repeat = 0
while opts.repeat == 0 or repeat < opts.repeat:
@ -387,6 +388,9 @@ def main(argv=None):
LOG.debug("Connection closed")
my_caller.destroy()
my_connection.destroy()
except Exception as e:
LOG.error("Unexpected exception occured: %s" % str(e))
return -1
return 0