diff --git a/exec/ipc.c b/exec/ipc.c index 253c5b70..61efb889 100644 --- a/exec/ipc.c +++ b/exec/ipc.c @@ -770,6 +770,12 @@ retry_recv: return; } else if (res == 0) { +#if defined(OPENAIS_SOLARIS) || defined(OPENAIS_BSD) || defined(OPENAIS_DARWIN) + /* On many OS poll never return POLLHUP or POLLERR. + * EOF is detected when recvmsg return 0. + */ + libais_disconnect_request (conn_info); +#endif return; } diff --git a/lib/util.c b/lib/util.c index 94ca6ee2..99eefdde 100644 --- a/lib/util.c +++ b/lib/util.c @@ -260,7 +260,7 @@ retry_recv: * EOF is detected when recvmsg return 0. */ if (result == 0) { - error = SA_AIS_ERR_BAD_HANDLE; + error = SA_AIS_ERR_LIBRARY; goto error_exit; } #endif