[En-Nut-Discussion] Blocked NutTcpAccept ?
Petr Odlozil
zip357 at centrum.cz
Tue Oct 31 15:09:21 CET 2006
Hello,
I have a simple application which accepts connections from a client and
save accepted sockets to a que. It sends then a message to the second
thread.
Second thread then takes theese sockets from the que and connects to
another server and send the messages from the socket to it. This thread
also sends the replies from the server back to that socket.
Everything works fine when the server is connected to the network.
When I disconnect the server, the thread awaiting connections from a
client blocks and doesn't accept any new connections.
Socket is correctly created, but it hangs on NutTcpAccept(). And the
thread isn't resumed (it's still in the sleep state), when some client
is trying to connect.
The second thread, which tries to connect to the server correctly
evaluates that the server is not connected and then just waits for
another message from the first thread.
Is it possible that NutTcpAccept() blocks somehow and doesn't receive
any new incomming connections and how to avoid this ?
My platform is Ethernut 1.3,
Accepting thread has priority 32
and Sending thread has priority 42
Best Regards
Petr Odlozil
More information about the En-Nut-Discussion
mailing list