diff options
author | Andy Green <andy.green@linaro.org> | 2013-10-24 22:07:04 +0800 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2013-10-24 22:32:06 +0800 |
commit | 68114573239849f192afd5d6c56ff14cc19d08ad (patch) | |
tree | 5ca2f01e530840304cb51ae133f8b02c71aa3327 /lib | |
parent | 24f4eb648b9104b4483a8a67331f8cd741896eec (diff) | |
download | libwebsockets-68114573239849f192afd5d6c56ff14cc19d08ad.tar.gz |
add EISCONN handling to client connect attempt
Signed-off-by: Andy Green <andy.green@linaro.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/client-handshake.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/client-handshake.c b/lib/client-handshake.c index a5015656..24968e7c 100644 --- a/lib/client-handshake.c +++ b/lib/client-handshake.c @@ -82,7 +82,7 @@ struct libwebsocket *__libwebsocket_client_connect_2( bzero(&server_addr.sin_zero, 8); if (connect(wsi->sock, (struct sockaddr *)&server_addr, - sizeof(struct sockaddr)) == -1) { + sizeof(struct sockaddr)) == -1 || errno == EISCONN) { if (errno == EALREADY || errno == EINPROGRESS) { lwsl_client("nonblocking connect retry\n"); |