Skip to content

Commit

Permalink
* Increase recv buffer size to try to thwart "SSL connection failed" …
Browse files Browse the repository at this point in the history
…errors.
  • Loading branch information
iProgramMC committed Jun 8, 2024
1 parent f1f8b0e commit c9a4eee
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions deps/httplib/httplib.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ extern int g_latestSSLError; // HACK - To debug an "SSL connection failed" issue
#endif

#ifndef CPPHTTPLIB_RECV_BUFSIZ
#define CPPHTTPLIB_RECV_BUFSIZ size_t(4096u)
#define CPPHTTPLIB_RECV_BUFSIZ size_t(16384u)
#endif

#ifndef CPPHTTPLIB_COMPRESSION_BUFSIZ
#define CPPHTTPLIB_COMPRESSION_BUFSIZ size_t(16384u)
#define CPPHTTPLIB_COMPRESSION_BUFSIZ size_t(32768u)
#endif

#ifndef CPPHTTPLIB_THREAD_POOL_COUNT
Expand Down Expand Up @@ -2465,7 +2465,7 @@ inline ssize_t select_read(socket_t sock, time_t sec, time_t usec) {
if (sock >= FD_SETSIZE) { return 1; }
#endif

fd_set fds;
fd_set fds{};
FD_ZERO(&fds);
FD_SET(sock, &fds);

Expand Down Expand Up @@ -2493,7 +2493,7 @@ inline ssize_t select_write(socket_t sock, time_t sec, time_t usec) {
if (sock >= FD_SETSIZE) { return 1; }
#endif

fd_set fds;
fd_set fds{};
FD_ZERO(&fds);
FD_SET(sock, &fds);

Expand Down

0 comments on commit c9a4eee

Please sign in to comment.