Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ex4_echo_server.c 客户端关闭再连接崩溃问题? #4

Open
Heng30 opened this issue Oct 7, 2020 · 1 comment
Open

ex4_echo_server.c 客户端关闭再连接崩溃问题? #4

Heng30 opened this issue Oct 7, 2020 · 1 comment

Comments

@Heng30
Copy link

Heng30 commented Oct 7, 2020

在 void on_connection(uv_stream_t *stream, int status) 中已经对client对象初始化了:
s_list_init(&client->list_node);
s_list_attach(&server->running_clients, &client->list_node);
在 static void run_client(async, void *arg) 中再次初始化:
s_list_init(&client->list_node);
s_list_attach(&client->server->running_clients, &client->list_node);
重复初始化存在问题.

@xhawk18
Copy link
Owner

xhawk18 commented Oct 11, 2020

确实是个bug,多谢指正

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

No branches or pull requests

2 participants