hafidz1977 / pymodbus

Automatically exported from code.google.com/p/pymodbus
0 stars 0 forks source link

Async read won't return in case the connection is interrupted #58

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create an async TCP connection to modbus server
2. Disconnected ethernet cable
3. Perform a "read_discrete_inputs"

What is the expected output? What do you see instead?
Expected output is a failed read. Instead I got nothing. The deferred doesn't 
fire.

What version of the product are you using? On what operating system?
pymodbus 0.9.0 on linux and windows.

Original issue reported on code.google.com by j.r.versteegh@gmail.com on 20 Mar 2012 at 2:28

GoogleCodeExporter commented 9 years ago
Note that ModbusClientProtocol.connectionLost has been called.

Original comment by j.r.versteegh@gmail.com on 20 Mar 2012 at 2:30

GoogleCodeExporter commented 9 years ago
The attached patch fixed it for me.

Original comment by j.r.versteegh@gmail.com on 20 Mar 2012 at 4:23

Attachments:

GoogleCodeExporter commented 9 years ago
Awesome, thanks a lot for the fix.  It has been applied and checked into the 
github repository.

Original comment by Bashw...@gmail.com on 22 Mar 2012 at 2:21