aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2017-02-06 21:11:17 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2017-02-06 21:11:17 +0100
commit1be02128e38dd6afa2bd3c535d9b47e437d50785 (patch)
tree622fec840c34e96bc1a97ba7a8b74839b56a773c
parent6017ce464d9e53506500ef0219fd5b5b3f84d4cd (diff)
downloadjson-rpc-shell-1be02128e38dd6afa2bd3c535d9b47e437d50785.tar.gz
json-rpc-shell-1be02128e38dd6afa2bd3c535d9b47e437d50785.tar.xz
json-rpc-shell-1be02128e38dd6afa2bd3c535d9b47e437d50785.zip
WebSocket: fix reconnection
-rw-r--r--json-rpc-shell.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/json-rpc-shell.c b/json-rpc-shell.c
index 9b5c4f7..3e5f18d 100644
--- a/json-rpc-shell.c
+++ b/json-rpc-shell.c
@@ -2042,6 +2042,8 @@ backend_ws_connect (struct ws_context *self, struct error **e)
self->url.field_data[UF_QUERY].len);
}
+ // TODO: I guess we should also reset it on error
+ self->state = WS_HANDLER_CONNECTING;
if (!backend_ws_establish_connection (self, url_host, url_port, e))
goto fail_1;