[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] Hardfault when closing TCP connection External
From: |
ALP-Schoof |
Subject: |
[lwip-users] Hardfault when closing TCP connection External |
Date: |
Tue, 2 Sep 2014 05:16:30 -0700 (PDT) |
Hello,
I'm trying to make a server which responds to a client.
The server responds to certain commands. Each client is handled in a
seperate task. When a client disconnect from the server, without prior
notice, the server crashes. I think it has something to do that the
receivetask tries to read the data from the netconn, but the netconn is
getting closed after the check.
When I receive a disconnect command, I delete the tasks first, and the
netconn after. Then there aren't any problems.
I do a check before reading the data like this:
**************************
if (rcvSocket->pcb.tcp->state > ESTABLISHED)
return -1;
netconn_recv(rcvSocket, &rcvBuff);
//Move the data to a local buffer
//Return
**************************
Using the netconn::state doesn't work either for this check
I couldn't figure any way to safely read data. The transmit task doesn't
seem to give any problems tough. Is there anyone who might have a solution?
I'm using FreeRTOS V8.0.1 and LWIP v1.4.1
<http://lwip.100.n7.nabble.com/file/n23118/Drawing1.png>
Thanks in advance
Cheers!
Ricardo
--
View this message in context:
http://lwip.100.n7.nabble.com/Hardfault-when-closing-TCP-connection-External-tp23118.html
Sent from the lwip-users mailing list archive at Nabble.com.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lwip-users] Hardfault when closing TCP connection External,
ALP-Schoof <=