lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] Assert on netconn_write: "already writing or closing"


From: Marco Jakobs
Subject: [lwip-users] Assert on netconn_write: "already writing or closing"
Date: Thu, 31 Jan 2013 18:02:45 +0100

Hi,

 

i've just noticed that i'll get the assert above if i access my hardware from outside. The scenario:

 

A telnet command "help" will write 2 pages of text data over a TCP connection, so some packets will be needed for this. The TCP connection is non-blocking and has a sndtimeout value of 10.

 

This works properly on a LAN connection, but once I'm accessing remotely over the internet, the "help" command will crash the system with the assert:

 

ASSERT: C:/Projekte/HCS-CPU2/Libraries/lwIP/src/api/api_msg.c:1357:already writing or closing

 

LwIP version is 1.4.1.

 

 

Changing the sndtimeout value from 10 to 500 will prevent this crash. I see the telnet output pausing a short while at the same place where it breaks with the setting 10ms, but then it continues.

 

I think due to the slower connection, the ACK-packets need more time so that the TCP buffer fills up to a point where the netconn_write needs to wait for a free buffer. The timeout value of 10ms will break this time – but why does it result with an assert which stops my system?

 

Maybe I have misunderstood the meaning of the non-blocking TCP send: I thought the netconn_write will just return with an ERR value, but crashing the system with an LWIP_ASSERT is a worse solution.

 

Any advice here?

 

Thanks,

Marco


reply via email to

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