# broken pipe

**URL:** <https://forums.digi.com/t/broken-pipe/5349>\
**Category:** NET+OS\
**Created:** [August 26, 2005, 10:13am UTC](https://forums.digi.com/t/broken-pipe/5349 "2005-08-26T10:13:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomy](https://avatars.discourse-cdn.com/v4/letter/t/9dc877/32.png) [@tomy](https://forums.digi.com/u/tomy)\
**Post date:** [August 26, 2005, 10:13am UTC](https://forums.digi.com/t/broken-pipe/5349/1 "2005-08-26T10:13:37Z")

</div>

hi support  
how we handle the broken pipe in threadx.ie how we detect if other side of the socket connection is closed ?..

---

<div class="post-metadata">

**Author:** ![egawtry](https://avatars.discourse-cdn.com/v4/letter/e/8e8cbc/32.png) [@egawtry](https://forums.digi.com/u/egawtry)\
**Post date:** [August 26, 2005, 3:36pm UTC](https://forums.digi.com/t/broken-pipe/5349/2 "2005-08-26T15:36:25Z")

</div>

How are you creating the pipe? Are you referring to a network pipe? I know that in NetOS 6 that does not work very well. In fact I had to hack around it. Very unstable.

If you are just calling it a pipe and it really is just a socket connection, then recv() will return 0 on a blocking connection to indicate a disconnect, or on a nonblocking connection use select().

-Erik
