Fossil SCM
Fix the socket_open() routine so that it returns a non-zero error code if it fails to connect.
Commit
aee65577cbaab3932c03cc0558331994d7211025
Parent
7a91ee99fce042a…
1 file changed
+1
+1
| --- src/http_socket.c | ||
| +++ src/http_socket.c | ||
| @@ -173,10 +173,11 @@ | ||
| 173 | 173 | break; |
| 174 | 174 | } |
| 175 | 175 | if( p==0 ){ |
| 176 | 176 | socket_set_errmsg("cannot connect to host %s:%d", pUrlData->name, |
| 177 | 177 | pUrlData->port); |
| 178 | + rc = 1; | |
| 178 | 179 | } |
| 179 | 180 | #if !defined(_WIN32) |
| 180 | 181 | signal(SIGPIPE, SIG_IGN); |
| 181 | 182 | #endif |
| 182 | 183 | end_socket_open: |
| 183 | 184 |
| --- src/http_socket.c | |
| +++ src/http_socket.c | |
| @@ -173,10 +173,11 @@ | |
| 173 | break; |
| 174 | } |
| 175 | if( p==0 ){ |
| 176 | socket_set_errmsg("cannot connect to host %s:%d", pUrlData->name, |
| 177 | pUrlData->port); |
| 178 | } |
| 179 | #if !defined(_WIN32) |
| 180 | signal(SIGPIPE, SIG_IGN); |
| 181 | #endif |
| 182 | end_socket_open: |
| 183 |
| --- src/http_socket.c | |
| +++ src/http_socket.c | |
| @@ -173,10 +173,11 @@ | |
| 173 | break; |
| 174 | } |
| 175 | if( p==0 ){ |
| 176 | socket_set_errmsg("cannot connect to host %s:%d", pUrlData->name, |
| 177 | pUrlData->port); |
| 178 | rc = 1; |
| 179 | } |
| 180 | #if !defined(_WIN32) |
| 181 | signal(SIGPIPE, SIG_IGN); |
| 182 | #endif |
| 183 | end_socket_open: |
| 184 |