WebSocket: fix reconnection

This commit is contained in:
Přemysl Eric Janouch 2017-02-06 21:11:17 +01:00
parent 6017ce464d
commit 1be02128e3
Signed by: p
GPG Key ID: B715679E3A361BE6
1 changed files with 2 additions and 0 deletions

View File

@ -2042,6 +2042,8 @@ backend_ws_connect (struct ws_context *self, struct error **e)
self->url.field_data[UF_QUERY].len); 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)) if (!backend_ws_establish_connection (self, url_host, url_port, e))
goto fail_1; goto fail_1;