net: websockets: do not close tcp socket in websocket

The websocket_connect api expects connected tcp socket, do not close
the user supplied socket so that the caller can re-use it if needed.

Signed-off-by: Saravanan Sekar <saravanan@linumiz.com>
This commit is contained in:
Saravanan Sekar 2023-06-16 01:05:49 +05:30 committed by Fabio Baltieri
parent e396f69afd
commit 3c9f3b7849

View file

@ -425,8 +425,6 @@ static int websocket_interal_disconnect(struct websocket_context *ctx)
NET_ERR("[%p] Failed to send close message (err %d).", ctx, ret);
}
ret = close(ctx->real_sock);
websocket_context_unref(ctx);
return ret;