net: telnet: User could telnet to zephyr only once

User could telnet to zephyr only once and the second connection
was denied. The reason was that the telnet socket was not properly
marked as accepting a new connection.

Fixes #20042

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
Jukka Rissanen 2019-10-23 09:26:25 +03:00
commit 873d1ed14a

View file

@ -238,6 +238,8 @@ static void telnet_accept(struct net_context *client,
goto error; goto error;
} }
net_context_set_accepting(client, false);
LOG_DBG("Telnet client connected (family AF_INET%s)", LOG_DBG("Telnet client connected (family AF_INET%s)",
net_context_get_family(client) == AF_INET ? "" : "6"); net_context_get_family(client) == AF_INET ? "" : "6");