net: net_app: Correctly notify server on TCP disconnection
If a disconnection callback was registered, it is not called as the check done in net_app is reversed. The disconnection callback is not called if there are any inactive contexts. The check should be on any active context. Signed-off-by: Philémon Jaermann <p.jaermann@gmail.com>
This commit is contained in:
parent
3641c25df9
commit
c3eea5f6ee
|
@ -200,7 +200,7 @@ void _net_app_received(struct net_context *net_ctx,
|
|||
* context do not call the close callback.
|
||||
*/
|
||||
for (i = 0; i < CONFIG_NET_APP_SERVER_NUM_CONN; i++) {
|
||||
if (!ctx->server.net_ctxs[i]) {
|
||||
if (ctx->server.net_ctxs[i]) {
|
||||
close = false;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue