zeromq / jeromq-jms

JeroMQ JMS
25 stars 13 forks source link

limit wait time for -1 socket timeouts and increase polling interval #10

Closed tommie-lie closed 5 years ago

tommie-lie commented 6 years ago

This patch increases the polling frequency to SOCKET_WAIT_MILLI_SECOND even when passing -1 as the timeout (which is done in all default cases). As a side effect, waitOnStatus with a -1 timeout does not wait infinitely long anymore but rather waits for a maximum of SOCKET_STATUS_TIMEOUT_MILLI_SECOND which is what the name of the constant suggests.

Fixes #9

tommie-lie commented 6 years ago

With this PR, all the tests run slightly faster (they don't wait for 5000ms but only for 500ms). We cannot go below the 500ms barrier with the timeouts configured like they are but it is possible now to reduce SOCKET_WAIT_MILLI_SECOND to e.g. 25ms and reduce the socket connection time even further.