Commit 3b5e48ab authored by Pontus Freyhult's avatar Pontus Freyhult
Browse files

In connect_local_command, check if the connection was successfull and

raise an exception otherwise.

Rev: src/io_commands.c:1.54
parent 5707ea5c
......@@ -374,12 +374,19 @@ DEFINE_COMMAND(connect_local_command)
{
CAST(local_info, info, a);
io_connect_local(info,
static struct exception gateway_exception =
STATIC_EXCEPTION(EXC_IO_CONNECT, "no usable gateway socket found");
struct lsh_fd *fd = io_connect_local(info,
make_connect_continuation(NULL, c),
e);
if (!fd)
EXCEPTION_RAISE(e, &gateway_exception);
}
/* Takes a listen_value as argument, logs the peer address, and
* returns the fd object. */
......
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