From 3c8efba3c47ca405b25d5d9c2990175e96a36b92 Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Thu, 22 Jan 2004 19:17:32 +0000 Subject: [PATCH] hybernate send/receive threads when there are enobuf problems --- src/ca/tcpiiu.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/ca/tcpiiu.cpp b/src/ca/tcpiiu.cpp index d59927931..daabbab87 100644 --- a/src/ca/tcpiiu.cpp +++ b/src/ca/tcpiiu.cpp @@ -226,6 +226,14 @@ unsigned tcpiiu::sendBytes ( const void *pBuf, continue; } + if ( localError == SOCK_ENOBUFS ) { + errlogPrintf ( + "CAC: system low on network buffers " + "- send retry in 15 seconds\n" ); + epicsThreadSleep ( 15.0 ); + continue; + } + if ( localError != SOCK_EPIPE && localError != SOCK_ECONNRESET && @@ -294,6 +302,14 @@ void tcpiiu::recvBytes ( if ( localErrno == SOCK_EINTR ) { continue; } + + if ( localErrno == SOCK_ENOBUFS ) { + errlogPrintf ( + "CAC: system low on network buffers " + "- receive retry in 15 seconds\n" ); + epicsThreadSleep ( 15.0 ); + continue; + } stat.bytesCopied = 0u; stat.circuitState = swioPeerAbort;