When my application start for near about 8-9 time read register is failed.
After that it will not fail to read register. It is strange that when I turn on debug using modbus_set_debug(ctx ,true) It will work fine.
## Steps to reproduce the behavior (commands or source code)
From Linux Board send every time request one by one to each slave at every 1 second
One Request Steps Like below. So every time send below request one by one.
========================================================================
modbus_new_rtu(pData->driver_name, pData->baudrate, pData->parity, pData->databit, pData->stopbit);
modbus_set_byte_timeout(ctx, 0, 0)
modbus_set_response_timeout(ctx, 0, 200000);
modbus_set_error_recovery(ctx,
MODBUS_ERROR_RECOVERY_LINK |
MODBUS_ERROR_RECOVERY_PROTOCOL)
modbus_set_slave(ctx, pData->slave_address)
modbus_rtu_set_rts(ctx, MODBUS_RTU_RTS_UP)
modbus_connect(ctx)
/*read input register*/
modbus_read_input_registers(ctx, 0, 10, 0)
modbus_close(ctx);
modbus_free(ctx);
========================================================================
## libmodbus output with debug mode enabled
Issue is not generated in debug mode. So first I have disable log and just add manually only printf in "_error_print" function. It will give below Error message.
ERROR Connection timed out:select