summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/socket/connect.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source4/lib/socket/connect.c b/source4/lib/socket/connect.c
index f3f9134f26..e7f2a11daf 100644
--- a/source4/lib/socket/connect.c
+++ b/source4/lib/socket/connect.c
@@ -56,6 +56,9 @@ NTSTATUS socket_connect_ev(struct socket_context *sock,
status = socket_connect(sock, my_address, my_port,
server_address, server_port, flags);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
event_add_fd(ev, tmp_ctx, socket_get_fd(sock), EVENT_FD_WRITE,
socket_connect_handler, &status);