Commit 6990caea authored by oroulet's avatar oroulet

Surface send_hello server errors from @urianchang

parent 2b462740
......@@ -233,7 +233,9 @@ class Client(object):
Send OPC-UA hello to server
"""
ack = await self.uaclient.send_hello(self.server_url.geturl(), self.max_messagesize, self.max_chunkcount)
# FIXME check ack
# TODO: Handle ua.UaError
if isinstance(ack, ua.UaStatusCodeError):
raise ack
async def open_secure_channel(self, renew=False):
"""
......
......@@ -82,7 +82,8 @@ class UASocketProtocol(asyncio.Protocol):
elif isinstance(msg, ua.Acknowledge):
self._call_callback(0, msg)
elif isinstance(msg, ua.ErrorMessage):
self.logger.warning("Received an error: %r", msg)
self.logger.fatal("Received an error: %r", msg)
self._call_callback(0, ua.UaStatusCodeError(msg.Error.value))
else:
raise ua.UaError("Unsupported message type: %s", msg)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment