forked from wolfSSL/wolfssl
Changes to make Jenkins happy and reduce verbosity.
- added HAVE_PTHREAD guards - usleep ---> XSLEEP_MS - only print polling message if verbose output requested.
This commit is contained in:
@ -755,9 +755,18 @@ static int SetupSocketAndConnect(info_t* info, const char* host,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Connect to the server */
|
/* Connect to the server */
|
||||||
while (info->serverListening == 0) {
|
#ifdef HAVE_PTHREAD
|
||||||
fprintf(stderr, "Waiting for server to listen...\n");
|
while ((info->serverListening == 0) && (info->server.shutdown == 0)) {
|
||||||
usleep(1);
|
if (info->showVerbose) {
|
||||||
|
fprintf(stderr, "Waiting for server to listen...\n");
|
||||||
|
}
|
||||||
|
XSLEEP_MS(1);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (info->server.shutdown == 1) {
|
||||||
|
fprintf(stderr, "ERROR: server side has shutdown\n");
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (connect(info->client.sockFd, (struct sockaddr*)&servAddr,
|
if (connect(info->client.sockFd, (struct sockaddr*)&servAddr,
|
||||||
@ -1163,7 +1172,9 @@ static int SocketWaitClient(info_t* info)
|
|||||||
info->server.sockFd = info->listenFd;
|
info->server.sockFd = info->listenFd;
|
||||||
} else {
|
} else {
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_PTHREAD
|
||||||
info->serverListening = 1;
|
info->serverListening = 1;
|
||||||
|
#endif
|
||||||
if ((connd = accept(info->listenFd, (struct sockaddr*)&clientAddr, &size)) == -1) {
|
if ((connd = accept(info->listenFd, (struct sockaddr*)&clientAddr, &size)) == -1) {
|
||||||
if (errno == SOCKET_EWOULDBLOCK)
|
if (errno == SOCKET_EWOULDBLOCK)
|
||||||
return -2;
|
return -2;
|
||||||
|
Reference in New Issue
Block a user