Skip to content
Snippets Groups Projects
Commit 02244bb8 authored by Andy Green's avatar Andy Green
Browse files

correct-proxy-fail-connect-handling.patch


Signed-off-by: default avatarAndy Green <andy@warmcat.com>
parent 9659f379
Branches
Tags
No related merge requests found
......@@ -199,20 +199,22 @@ libwebsocket_client_connect(struct libwebsocket_context *this,
if (n < 0) {
fprintf(stderr, "ERROR writing to "
"proxy socket\n");
goto bail2;
goto bail1;
}
n = recv(wsi->sock, pkt, sizeof pkt, 0);
if (n < 0) {
close(wsi->sock);
fprintf(stderr, "ERROR reading from "
"proxy socket\n");
goto bail2;
goto bail1;
}
pkt[13] = '\0';
if (strcmp(pkt, "HTTP/1.0 200 ") != 0) {
close(wsi->sock);
fprintf(stderr, "ERROR from proxy: %s\n", pkt);
goto bail2;
goto bail1;
}
/* we can just start sending to proxy */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment