File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -739,10 +739,15 @@ int main(int argc, char *argv[])
739739 usleep (1000000 );
740740 modbus_flush (ctx );
741741
742- #ifdef _WIN32
743- /* Timeout of 20ms between bytes, allow for 2*16+1
744- * Windows sleep seems to be at least 15ms always
745- */
742+ #if defined(_WIN32 ) || defined(__FreeBSD__ ) || defined(__OpenBSD__ )
743+ /* Timeout of 20ms between bytes, allow for 2*16+1
744+ * Windows sleep seems to be at least 15ms always
745+ * Windows sleep seems to be at least 15ms always.
746+ * For some reason, FreeBSD 12 and OpenBSD 6.5 also
747+ * tended to fail with 7ms variant as "gmake check"
748+ * but pass in
749+ * gmake -j 8 && ( ./tests/unit-test-server|cat & sleep 1 ; ./tests/unit-test-client|cat )
750+ */
746751 TEST_TITLE ("2/2 Adapted byte timeout (33ms > 20ms)" );
747752 modbus_set_byte_timeout (ctx , 0 , 33000 );
748753 rc = modbus_read_registers (
You can’t perform that action at this time.
0 commit comments