From 1be02128e38dd6afa2bd3c535d9b47e437d50785 Mon Sep 17 00:00:00 2001 From: Přemysl Janouch Date: Mon, 6 Feb 2017 21:11:17 +0100 Subject: WebSocket: fix reconnection --- json-rpc-shell.c | 2 ++ 1 file changed, 2 insertions(+) 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; -- cgit v1.2.3-70-g09d2