Realtime Interface (port 30003) not recovering from TCP Window Full

Problem
I’m writing a program which connects to realtime interface using QTcpScoket from Qt5.9. When the program is unable to read from socket for a short period of time (eg. hit a break point during debugging or thead hangs), nothing will be received from the robot anymore.

Environment
robot: UR5 with CB3.1 and PolyScope3.5
PC: Windows10

I tried to use Wireshark to track down the underlying communication, and the results are following:
The PC’s IP is 192.168.1.100, and robot’s IP is 192.168.1.50.
After the program hit a break point, the window size of the socket started decreasing (No. 1480).

About 4 seconds later, the communication was completely blocked (No. 2189) due to TCP Window Full. When the program continued to run (No.2207), some pending data frames were mixed and splited into MTUs.

Finally, the socket became silent very soon.

My temporary workaround is to close and reopen the socket, but is there a better solution? Also, the broken packets after TCP Window Update look like a bug very much.

Can you share controller log as well?
Looks like transmit side closed silently.

The log indeed contains many error messages.

recording20181122_09_02_59.zip (852.8 KB)
recording20181122_09_05_15.zip (1.1 MB)

I have the exact same issue. In URControl.log.0, you can see

WARNING - Failed to send state to client 129.111.169.50. Sending discontinued

recording20230317_13_52_04-tcpdump.zip (149.7 KB)
recording20230317_13_52_04.zip (6.0 MB)

EDIT: This only happen when the safety circuit is open, but this is probably more because it changes the behavior of the program on my side.