Skip to content

Commit

Permalink
Fix wolfssl connect
Browse files Browse the repository at this point in the history
  • Loading branch information
RipleyTom committed Mar 3, 2023
1 parent 1d7a006 commit 09e0026
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rpcs3/Emu/NP/rpcn_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -707,11 +707,11 @@ namespace rpcn
sockfd = socket(AF_INET, SOCK_STREAM, 0);

#ifdef _WIN32
u32 timeout = 5;
u32 timeout = 200; // 200ms
#else
struct timeval timeout;
timeout.tv_sec = 0;
timeout.tv_usec = 50000; // 50ms
timeout.tv_usec = 200000; // 200ms
#endif

if (setsockopt(sockfd, SOL_SOCKET, SO_RCVTIMEO, reinterpret_cast<char*>(&timeout), sizeof(timeout)) < 0)
Expand Down Expand Up @@ -750,7 +750,7 @@ namespace rpcn
int ret_connect;
while ((ret_connect = wolfSSL_connect(read_wssl)) != SSL_SUCCESS)
{
if (wolfSSL_want_read(read_wssl))
if (wolfSSL_want_read(read_wssl) || wolfSSL_want_write(read_wssl))
continue;

state = rpcn_state::failure_wolfssl;
Expand Down

0 comments on commit 09e0026

Please sign in to comment.