diff options
author | Hans Dedecker <dedeckeh@gmail.com> | 2017-02-18 13:41:52 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2017-02-20 11:31:56 +0100 |
commit | dfe338350e4dc6912a2552570fa5dd8d5bc84ff0 (patch) | |
tree | 6062e8d746a4ea5ef36ec909ce7d9342c04eaa2e | |
parent | 6eb3c9647e04d38f14e6c8d3e2d9b6922f2a43d1 (diff) | |
download | ubus-dfe338350e4dc6912a2552570fa5dd8d5bc84ff0.tar.gz |
libubus: reset ctx->sock.error when doing ubus reconnect
When ubus connect fails ctx->sock.eof will be set but ctx->sock.error
can be set as well. Reset ctx->sock.error as well when doing ubus
reconnect
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
-rw-r--r-- | libubus-io.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libubus-io.c b/libubus-io.c index 7047ac5..daa7106 100644 --- a/libubus-io.c +++ b/libubus-io.c @@ -375,6 +375,7 @@ int ubus_reconnect(struct ubus_context *ctx, const char *path) } ctx->sock.eof = false; + ctx->sock.error = false; ctx->sock.fd = usock(USOCK_UNIX, path, NULL); if (ctx->sock.fd < 0) return UBUS_STATUS_CONNECTION_FAILED; |