how to detect sock discon? I used select.select([],[],[socket_name]) which will give error occurrence but it didnot work

def first_conection():
socket_with_cli,ip_script = initl_sock_to_accecpt_conn_ATM.accept()
socket_with_cli.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1)
received_list,sending_list,errors_list = select.select([], [], [socket_with_ATM])

What product is this in reference to?