From 0fef6bdee85f9c152762cb42566c9f43de6bc449 Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Wed, 14 Mar 2018 10:01:47 +0000 Subject: [PATCH] Maximum connections on Windows increased to 2048. Thanks to ericGTT. --- ChangeLog.txt | 1 + src/mosquitto.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/ChangeLog.txt b/ChangeLog.txt index afa47c9a..3375b59e 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -62,6 +62,7 @@ Broker: Closes #8. - Add set_tcp_nodelay option to allow Nagle's algorithm to be disabled on client sockets. Closes #433. +- Maximum connections on Windows increased to 2048. Client library: - Outgoing messages with QoS>1 are no longer retried after a timeout period. diff --git a/src/mosquitto.c b/src/mosquitto.c index 6bb74404..0c6e41ce 100644 --- a/src/mosquitto.c +++ b/src/mosquitto.c @@ -232,6 +232,10 @@ int main(int argc, char *argv[]) srand(tv.tv_sec + tv.tv_usec); #endif +#ifdef WIN32 + _setmaxstdio(2048); +#endif + memset(&int_db, 0, sizeof(struct mosquitto_db)); net__init();