rsrv: better error msg when listen() fails

This commit is contained in:
Michael Davidsaver
2014-08-13 14:26:03 -04:00
parent cafebf2428
commit b7e46b8b02
+5 -1
View File
@@ -170,7 +170,11 @@ static void req_server (void *pParm)
/* listen and accept new connections */
if ( listen ( IOC_sock, 20 ) < 0 ) {
errlogPrintf ("CAS: Listen error\n");
char sockErrBuf[64];
epicsSocketConvertErrnoToString (
sockErrBuf, sizeof ( sockErrBuf ) );
errlogPrintf ( "CAS: Listen error %s\n",
sockErrBuf );
epicsSocketDestroy (IOC_sock);
epicsThreadSuspendSelf ();
}