summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Green <andy@warmcat.com>2016-04-22 12:40:44 +0800
committerAndy Green <andy@warmcat.com>2016-04-22 12:40:44 +0800
commit12df0f0acd83b5d1e3c332aa9a5b064040da4e4e (patch)
tree5607f2092ea31fae7216fc2e87af7faab7e22ceb
parent461a9068f5d6f241abb54b7a71c1001f6e6f1166 (diff)
downloadlibwebsockets-12df0f0acd83b5d1e3c332aa9a5b064040da4e4e.tar.gz
libwebsockets-12df0f0acd83b5d1e3c332aa9a5b064040da4e4e.tar.bz2
libwebsockets-12df0f0acd83b5d1e3c332aa9a5b064040da4e4e.zip
client account for retries
Signed-off-by: Andy Green <andy@warmcat.com>
-rw-r--r--lib/client-handshake.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/client-handshake.c b/lib/client-handshake.c
index 629ad060..cdc49d57 100644
--- a/lib/client-handshake.c
+++ b/lib/client-handshake.c
@@ -305,6 +305,9 @@ oom4:
/* we're closing, losing some rx is OK */
wsi->u.hdr.ah->rxpos = wsi->u.hdr.ah->rxlen;
lws_header_table_detach(wsi);
+ /* take care that we might be inserted in fds already */
+ if (wsi->position_in_fds_table != -1)
+ goto failed;
lws_free(wsi);
return NULL;