From 763b9b2cf293fb60b5c2ddf34e2500f95200b6b5 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 3 Feb 2017 14:13:48 +0100 Subject: [PATCH] libubus: reset ctx->sock.eof to fix reconnect issues Signed-off-by: Felix Fietkau --- libubus-io.c | 1 + 1 file changed, 1 insertion(+) 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; -- 2.11.0