--- libaitrpc/src/aitrpc.c 2013/11/15 08:48:04 1.12.4.4 +++ libaitrpc/src/aitrpc.c 2013/11/15 09:07:42 1.12.4.5 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aitrpc.c,v 1.12.4.4 2013/11/15 08:48:04 misho Exp $ +* $Id: aitrpc.c,v 1.12.4.5 2013/11/15 09:07:42 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -169,7 +169,10 @@ rpc_Read(int sock, int type, int flags, sockaddr_t * _ for (len = blen; len > 0; len -= ret, buf += ret) { if ((ret = poll(&pfd, 1, DEF_RPC_TIMEOUT * 1000)) < 1 || pfd.revents & (POLLERR | POLLHUP | POLLNVAL)) { - LOGERR; + if (ret) + LOGERR; + else + rpc_SetErr(ETIMEDOUT, "Timeout reached! Server not respond"); return -1; } if (type == SOCK_STREAM)