Repository: pymodbus-dev/pymodbus

Issue:
serial async client 3.0.2 timeout always takes 3,0s no matter the value set to timeout
<!--
Please use the Pymodbus gitter channel at https://gitter.im/pymodbus_dev/Lobby or Stack Overflow(tag [pymodbus](https://stackoverflow.com/questions/tagged/pymodbus) for
support questions.

Before opening a new issue, make sure you do the following:
    * check that your issue isn't already filed: https://github.com/riptideio/pymodbus/issues
    * check the discussions forum https://github.com/riptideio/pymodbus/discussions
    * prepare a short, runnable example that reproduce the issue with the latest development version of Pymodbus
-->

### Versions

* Python: 3,8
* OS: 22.04, 20.04
* Pymodbus: 3.0,2
* Modbus Hardware (if used): Different sensors: Temperature, GPIO

### Pymodbus Specific
* Server: NA
* Client: rtu - async

### Description
Whenever there is an issue with the sensor (power loss, wiring problem) the AsyncModbusSerialClient always times out after 3.0s, despite that during the client instantiation we set a timeout with a different value.

What were you trying, what has happened, what went wrong, and what did you expect?
It can be easily repeated: just disconnect the 485 (modbus) connection cables from the peripheral and timeout raises after 3.0s

I had already reported this issue 6 weeks ago: [timeout issue](https://github.com/riptideio/pymodbus/issues/1155#issue-1429652728)

[GraciousGpal ](https://github.com/riptideio/pymodbus/issues/1155#issuecomment-1301483726) pointed out that this issue was also present in AsyncModbusTCPClient(). He worked out a solution that when I apply to AsyncModbusSerialClient() works too,

It seemed, though, that his comment lead to fix the same issue for AyncModbusTCPClient(), but it was not applied to AsyncSerialModbusClient)()

### Code and Logs

```python
# code and logs here.

# please use the following to format logs when posting them here
import pymodbus
pymodbus.pymodbus_apply_logging_config()

...
                        client =  AsyncModbusSerialClient(port=self.commPort, baudrate=self.commSpeed, timeout=self.commTimeout)
                        await client.connect()
                        self.client = client

                        # Fix timeout issue. Otherwise it takes default 3.0s
                        self.client.protocol.params.timeout = self.commTimeout
                        self.client.protocol.transaction.client.params.timeout = self.commTimeout

...
```



Discussion:
It is very likely it was only applied to AsyncModbusTCPClient, because the client directory is being reworked. I will apply your code later....you could also submit it as a pull request, and save me the job.

Resolving patch:
diff --git a/pymodbus/client/serial.py b/pymodbus/client/serial.py
--- a/pymodbus/client/serial.py
+++ b/pymodbus/client/serial.py
@@ -88,7 +88,9 @@ async def close(self):  # pylint: disable=invalid-overridden-method
 
     def _create_protocol(self):
         """Create protocol."""
-        protocol = ModbusClientProtocol(framer=self.params.framer, xframer=self.framer)
+        protocol = ModbusClientProtocol(
+            framer=self.params.framer, xframer=self.framer, timeout=self.params.timeout
+        )
         protocol.factory = self
         return protocol
 


Test patch: