/*
Process the new connection */ if(err == ERR_OK) { while( err == ERR_OK) { structnetbuf*rxBuf = NULL;
err = netconn_recv( newconn, &rxBuf );
/* Continuously get data
requests from TCP Client and send response */ do
{
/* Get
data from netbuf */
netbuf_data(rxBuf, &requestReceived, &reqLength);
Server app (lwip) is a part of embedded
system. TCP Client Test application is running
on my PC. There are 2 ways of disconnection which
I have tested:
CASE 1. Turn off Client application
(cable between my PC and embedded system remain connected). Registered errors: ERR_CONN/**
Not connected. */or ERR_RST/**
Connection reset. */or ERR_CLSD/**
Connection closed. */ Resources were properly freed. In lwip_stats.memp[0]
(MEMP_TCP_PCB)) was decreased by 1. I can make new connection by run Client
application on PC and connection is being established. Everything works
fine.
CASE 2. Disconnect eth cable by removing
RJ45 connector. Registered errors: ERR_RTE/**
Routing problem. */ Resources WERE NOT properly freed. In
lwip_stats.memp[0] (MEMP_TCP_PCB)) is on the same level as before
cable disconnection. I can make new connection but number of used resources
is increasing every time new connection is being established.
How can I handle cable disconnection
to achieve resource release as in case 1? Have you had similar issues?
Best Regards, Michał Timm
WB Electronics S.A. 05-850 Ozarow Mazowiecki, ul. Poznanska 129/133 NIP: 526-216-83-87 REGON: 0128903491 KRS: 0000369722 W.K.Z.: 516 616,35 PLN Sad Rejonowy dla m. st. WARSZAWY w Warszawie XIV Wydzial Gospodarczy Krajowego Rejestru Sadowego
Powyższa wiadomość stanowi własność WB Electronics, jest przeznaczona wyłącznie dla jej adresata/adresatów i może zawierać informacje prawnie chronione. Jeżeli otrzymali Państwo e-mail omyłkowo, proszę o poinformowanie nadawcy oraz niezwłoczne usunięcie wiadomości wraz z jej załącznikami. Ujawnianie, kopiowanie lub rozpowszechnianie treści korespondencji lub załączników bez zgody nadawcy jest zabronione.
The message is intended only for its addressee(s), is owned by WB Electronics and may contain information protected by law. If you are not the addressee and have received this e-mail, please notify the sender and delete this message and all its attachments from your computer. Any copying or dissemination of the message or its attachments must first be approved by the sender.
[Prev in Thread]
Current Thread
[Next in Thread]
[lwip-users] TCP server disconnection issue,
Michal Timm<=