[En-Nut-Discussion] anyone had probs with setting SO_RCVTIMEO causing lockups?

Damian Slee damian at commtech.com.au
Tue Sep 16 09:39:18 CEST 2003


	u_long opt;
	// set receive timeout
	opt = 500;
	NutTcpSetSockOpt(sock, SO_RCVTIMEO, &opt, sizeof(opt));

	for(;;)
	{
		rx = NutTcpReceive(sock, rxBuf, 64);

seems to lock in NutTcpReceive() forever.  other threads no longer function.
Removing NutTcpSetSockOpt() fixes it, but data required for NutTcpReceive() to return.

		if (rx == -1)		// socket error?
			break;

		...
	}



More information about the En-Nut-Discussion mailing list