libubus: reset ctx->sock.eof to fix reconnect issues

Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
Felix Fietkau 2017-02-03 14:13:48 +01:00
parent 6f4e11e1db
commit 763b9b2cf2

View file

@ -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;