[Top][All Lists]

[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)


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
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

Thanks in advance


View this message in context: 
Sent from the lwip-users mailing list archive at Nabble.com.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]