hybernate receive threads when there are enobuf problems

This commit is contained in:
Jeff Hill
2004-01-22 20:31:21 +00:00
parent 3c8efba3c4
commit fbe397addb

View File

@@ -58,7 +58,7 @@ void camsgtask ( void *pParm )
}
cas_send_bs_msg ( client, TRUE );
while ( TRUE ) {
while ( ! client->disconnect ) {
client->recv.stk = 0;
assert ( client->recv.maxstk >= client->recv.cnt );
@@ -71,9 +71,21 @@ void camsgtask ( void *pParm )
}
break;
}
else if (nchars<0) {
else if ( nchars < 0 ) {
int anerrno = SOCKERRNO;
if ( anerrno == SOCK_EINTR ) {
continue;
}
if ( anerrno == SOCK_ENOBUFS ) {
errlogPrintf (
"rsrv: system low on network buffers "
"- receive retry in 15 seconds\n" );
epicsThreadSleep ( 15.0 );
continue;
}
/*
* normal conn lost conditions
*/