libubus: reset ctx->sock.eof to fix reconnect issues
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
6f4e11e1db
commit
763b9b2cf2
1 changed files with 1 additions and 0 deletions
|
@ -372,6 +372,7 @@ int ubus_reconnect(struct ubus_context *ctx, const char *path)
|
||||||
close(ctx->sock.fd);
|
close(ctx->sock.fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ctx->sock.eof = false;
|
||||||
ctx->sock.fd = usock(USOCK_UNIX, path, NULL);
|
ctx->sock.fd = usock(USOCK_UNIX, path, NULL);
|
||||||
if (ctx->sock.fd < 0)
|
if (ctx->sock.fd < 0)
|
||||||
return UBUS_STATUS_CONNECTION_FAILED;
|
return UBUS_STATUS_CONNECTION_FAILED;
|
||||||
|
|
Loading…
Add table
Reference in a new issue