From: Felix Fietkau Date: Fri, 3 Feb 2017 13:13:48 +0000 (+0100) Subject: libubus: reset ctx->sock.eof to fix reconnect issues X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fubus.git;a=commitdiff_plain;h=763b9b2cf293fb60b5c2ddf34e2500f95200b6b5 libubus: reset ctx->sock.eof to fix reconnect issues Signed-off-by: Felix Fietkau --- 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;