summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2017-02-03 14:13:48 +0100
committerFelix Fietkau <nbd@nbd.name>2017-02-03 14:13:54 +0100
commit763b9b2cf293fb60b5c2ddf34e2500f95200b6b5 (patch)
treef7fe5867b0a848b870ba9a11977e4305a3360aab
parent6f4e11e1db399074273944329883f9c35e7daef6 (diff)
downloadubus-763b9b2cf293fb60b5c2ddf34e2500f95200b6b5.tar.gz
libubus: reset ctx->sock.eof to fix reconnect issues
Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r--libubus-io.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libubus-io.c b/libubus-io.c
index 0582ff7..1075c65 100644
--- a/libubus-io.c
+++ b/libubus-io.c
@@ -372,6 +372,7 @@ int ubus_reconnect(struct ubus_context *ctx, const char *path)
close(ctx->sock.fd);
}
+ ctx->sock.eof = false;
ctx->sock.fd = usock(USOCK_UNIX, path, NULL);
if (ctx->sock.fd < 0)
return UBUS_STATUS_CONNECTION_FAILED;