handle case where POLLHUP or POLLERR are not supported by OS

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1311 fd59a12c-fef9-0310-b244-a6a79926bd2f
This commit is contained in:
Fabien Thomas 2006-11-23 08:49:21 +00:00
parent 97919b8d16
commit cdb8452805
2 changed files with 7 additions and 1 deletions

View File

@ -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;
}

View File

@ -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