add EISCONN handling to client connect attempt

Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
Andy Green 2013-10-24 22:07:04 +08:00
parent 24f4eb648b
commit 6811457323

View file

@ -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");