Skip to content

Commit c91b218

Browse files
authored
Sync TLS needs time before reading frame (#2186)
1 parent 559e516 commit c91b218

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pymodbus/framer/old_framer_tls.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""TLS framer."""
22
import struct
3+
from time import sleep
34

45
from pymodbus.exceptions import (
56
ModbusIOException,
@@ -42,6 +43,11 @@ def decode_data(self, data):
4243
return {"fcode": fcode}
4344
return {}
4445

46+
def recvPacket(self, size):
47+
"""Receive packet from the bus."""
48+
sleep(0.5)
49+
return super().recvPacket(size)
50+
4551
def frameProcessIncomingPacket(self, _single, callback, _slave, _tid=None, **kwargs):
4652
"""Process new packet pattern."""
4753
# no slave id for Modbus Security Application Protocol

0 commit comments

Comments
 (0)