steveohara / j2mod

Enhanced Modbus library implemented in the Java programming language
Apache License 2.0
267 stars 111 forks source link

Increased maximum queue length for incoming connections. #38

Closed martentamerius closed 7 years ago

martentamerius commented 7 years ago

Adjusted maximum queue length for incoming connections from 5 to 50 when instantiating ServerSocket in ModbusTCPListener.

This was bothering us while unit testing one of our application which uses the j2mod-library.

The new maximum queue length (or "flood protection" as it is named in the source code) of 50 was actually chosen as the default maximum queue length because this is the default value mentioned in the (Oracle) Javadoc of java.net.ServerSocket.

steveohara commented 7 years ago

Added this change, thanks