mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
win32: client: just do WIN32 check
This commit is contained in:
parent
a2091bdbc8
commit
8886cc263f
1 changed files with 5 additions and 5 deletions
|
@ -73,9 +73,11 @@ typedef enum {
|
|||
static lcccr_t
|
||||
lws_client_connect_check(struct lws *wsi)
|
||||
{
|
||||
int e = 0;
|
||||
int en = 0;
|
||||
#if !defined(WIN32)
|
||||
int e;
|
||||
socklen_t sl = sizeof(e);
|
||||
#endif
|
||||
|
||||
(void)en;
|
||||
|
||||
|
@ -84,10 +86,8 @@ lws_client_connect_check(struct lws *wsi)
|
|||
* condition, the connect definitively failed.
|
||||
*/
|
||||
|
||||
#if !defined(WIN32)
|
||||
if (!getsockopt(wsi->desc.sockfd, SOL_SOCKET, SO_ERROR,
|
||||
#if defined(WIN32)
|
||||
(char *)
|
||||
#endif
|
||||
&e, &sl)) {
|
||||
en = LWS_ERRNO;
|
||||
if (!e) {
|
||||
|
@ -101,7 +101,7 @@ lws_client_connect_check(struct lws *wsi)
|
|||
wsi->desc.sockfd, e);
|
||||
}
|
||||
|
||||
#if defined(WIN32)
|
||||
#else
|
||||
|
||||
if (!connect(wsi->desc.sockfd, NULL, 0))
|
||||
return LCCCR_CONNECTED;
|
||||
|
|
Loading…
Add table
Reference in a new issue