UR3 stops sending data to port 30003?

Hi,

For some reason, the socket communication with the UR3 fails after some time.

import select
import socket
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client.connect((UR3_address, 30003))
while True:
    packet_size = 1116
    sock_list, [], [] = select.select([client], [], [], 5)
    if len(sock_list) > 0:
        data = client.recv(packet_size)
        print(data)
    else: 
        client.shutdown(socket.SHUT_RDWR)
        client.close()

The python snippet above just keeps reading the real time status of the robot. This works fine maybe for several minutes (not consistent). After several minuets or so, however, select.select() all of a sudden returns an empty list. Once this happens, the socket will never be ready for reading again.

What is strange is, select.select() used to work for many months, and this problem started to occur a few weeks ago. Is this related to network speed or something? All suggestions are welcome!

Silly me. It was just a matter of physical connection.