Skip to content

Connection (socket) not closed when connection is lost #1662

Discussion options

You must be logged in to vote

When you close your client, it clearly sends a closure indication (FIN).

If you unplug your client's network cable, the server won't notice until a TCP keep-alive timer expires.

If you power off your AP on a WiFi server... well, TCP won't notice until keep-alive timer expires; but you should have some way of detecting link status if that is important to you. Check your vendor implementation, lwIP's netif reference is here.

You should not call mg_mgr_free() right away but close your connections first.

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
3 replies
@steteb
Comment options

@scaprile
Comment options

scaprile Aug 4, 2022
Collaborator

@steteb
Comment options

Answer selected by scaprile
Comment options

You must be logged in to vote
5 replies
@steteb
Comment options

@steteb
Comment options

@scaprile
Comment options

@steteb
Comment options

@cpq
Comment options

cpq Sep 22, 2022
Maintainer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants