File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 1
1
## 12.0.0
2
- * Added io_context and threads setting options for example broker (#866 )
2
+ * Improved exampless (#870 )
3
+ * Fixed example broker's invalid sync connack call (#869 )
4
+ * Added no CONNACK sending mode to the example broker (#869 )
5
+ * Added posting code to acceptors (#867 )
6
+ * Added io_context and threads setting options for example broker (#866 , #871 )
3
7
* Fixed moved from object access (#865 )
4
8
* <<<< breaking change >>>> Removed ioc_con() and ioc_accept() (#866 )
5
9
* <<<< breaking change >>>> Unified automatic async/sync choosing flag. (#857 , #862 )
14
18
* Added multi thread support for example broker (#842 , #855 , #866 )
15
19
* Replaced example broker's API call from sync to async (#842 )
16
20
* Replaced use_certificate_file() with use_certificate_chain_file() to support both server cert and server - intermediate CA cert (#841 )
17
- * <<<< breaking change >>>> Added async_force_disconnect(). force_disconnect() is removed from async_client (#840 )
21
+ * <<<< breaking change >>>> Added async_force_disconnect(). force_disconnect() is removed from async_client (#840 , # 868 )
18
22
* Added will delay interval support (#839 )
19
23
* Fixed async_handler_t calling timing (#836 )
20
24
* Added BOOST_ASIO_NO_TS_EXECUTORS support (#830 )
Original file line number Diff line number Diff line change 10
10
#include < boost/program_options.hpp>
11
11
12
12
#include < fstream>
13
+ #include < algorithm>
13
14
14
15
namespace as = boost::asio;
15
16
@@ -349,8 +350,8 @@ void run_broker(boost::program_options::variables_map const& vm) {
349
350
return 1 ;
350
351
} ();
351
352
if (threads_per_ioc == 0 ) {
352
- MQTT_LOG ( " mqtt_broker " , error) << " threads per ioc must be greater than 0 " ;
353
- return ;
353
+ threads_per_ioc = std::max ( std::size_t ( std::thread::hardware_concurrency ()), std::size_t ( 4 )) ;
354
+ MQTT_LOG ( " mqtt_broker " , info) << " threads_per_ioc set to auto decide (0). Automatically set to " << threads_per_ioc ;
354
355
}
355
356
356
357
MQTT_LOG (" mqtt_broker" , info)
You can’t perform that action at this time.
0 commit comments