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

**URL:** <https://forums.digi.com/t/how-to-detect-sock-discon-i-used-select-select-socket-name-which-will-give-error-occurrence-but-it-didnot-work/18918>\
**Category:** Python\
**Tags:** \_\
**Created:** [November 22, 2017, 10:26am UTC](https://forums.digi.com/t/how-to-detect-sock-discon-i-used-select-select-socket-name-which-will-give-error-occurrence-but-it-didnot-work/18918 "2017-11-22T10:26:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![silambarasan](https://avatars.discourse-cdn.com/v4/letter/s/8c91f0/32.png) [@silambarasan](https://forums.digi.com/u/silambarasan)\
**Post date:** [November 22, 2017, 10:26am UTC](https://forums.digi.com/t/how-to-detect-sock-discon-i-used-select-select-socket-name-which-will-give-error-occurrence-but-it-didnot-work/18918/1 "2017-11-22T10:26:47Z")

</div>

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])

---

<div class="post-metadata">

**Author:** ![mvut](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.digi.com/mvut/32/31_2.png) [@mvut](https://forums.digi.com/u/mvut)\
**Post date:** [November 22, 2017, 11:15am UTC](https://forums.digi.com/t/how-to-detect-sock-discon-i-used-select-select-socket-name-which-will-give-error-occurrence-but-it-didnot-work/18918/2 "2017-11-22T11:15:18Z")

</div>

What product is this in reference to?
