diff --git a/src/ca/iocinf.c b/src/ca/iocinf.c index 5e95a81f5..07d289c83 100644 --- a/src/ca/iocinf.c +++ b/src/ca/iocinf.c @@ -1,4 +1,5 @@ /************************************************************************/ +/* $Id$ */ /* */ /* L O S A L A M O S */ /* Los Alamos National Laboratory */ @@ -45,6 +46,7 @@ /* 021794 joh turn on SO_REUSEADDR only after the test for */ /* address in use so that test works on UNIX */ /* kernels that support multicast */ +/* $Log$ */ /* */ /*_begin */ /************************************************************************/ @@ -1044,6 +1046,16 @@ LOCAL void udp_recv_msg(struct ioc_in_use *piiu) UNLOCK; return; } +# ifdef linux + /* + * Avoid spurious ECONNREFUSED bug + * in linux + */ + if (MYERRNO==ECONNREFUSED) { + UNLOCK; + return; + } +# endif ca_printf("Unexpected UDP failure %s\n", strerror(MYERRNO)); } else if(status > 0){ diff --git a/src/ca/repeater.c b/src/ca/repeater.c index c5f4311d1..329757c4a 100644 --- a/src/ca/repeater.c +++ b/src/ca/repeater.c @@ -1,4 +1,6 @@ /* + * $Id$ + * * REPEATER.C * * CA broadcast repeater @@ -59,6 +61,8 @@ * .08 102993 joh toggle set sock opt to set * .09 070195 joh discover client has vanished by connecting its * datagram socket (and watching for ECONNREFUSED) + * + * $Log$ */ static char *sccsId = "@(#)$Id$"; @@ -149,6 +153,15 @@ void ca_repeater() &from_size); if(size < 0){ +# ifdef linux + /* + * Avoid spurious ECONNREFUSED bug + * in linux + */ + if (MYERRNO==ECONNREFUSED) { + continue; + } +# endif ca_printf("CA Repeater: recv err %s\n", strerror(MYERRNO)); continue;