mirror of
https://github.com/eclipse-mosquitto/mosquitto.git
synced 2026-09-24 09:14:02 +08:00
Increase maximum connection count on Windows from 2048 to 8192.
This is only where supported. Closes #2122. Thanks to yellowgg2.
This commit is contained in:
@@ -7,6 +7,8 @@ Broker:
|
||||
- Add connection-state example plugin to demonstrate MOSQ_EVT_CONNECT.
|
||||
- Plugins on non-Windows platforms now no longer make their symbols globally
|
||||
available, which means they are self contained.
|
||||
- Increase maximum connection count on Windows from 2048 to 8192 where
|
||||
supported. Closes #2122.
|
||||
|
||||
Client library:
|
||||
- Add MOSQ_OPT_DISABLE_SOCKETPAIR to allow the disabling of the socketpair
|
||||
|
||||
+7
-1
@@ -481,7 +481,13 @@ int main(int argc, char *argv[])
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
_setmaxstdio(2048);
|
||||
if(_setmaxstdio(8192) != 8192){
|
||||
/* Old limit was 2048 */
|
||||
if(_setmaxstdio(2048) != 2048){
|
||||
log__printf(NULL, MOSQ_LOG_WARNING, "Warning: Unable to increase maximum allowed connections. This session may be limited to 512 connections.");
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
memset(&db, 0, sizeof(struct mosquitto_db));
|
||||
|
||||
Reference in New Issue
Block a user