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

keepalive bug #12

Closed
ccsexyz opened this issue Feb 13, 2017 · 5 comments
Closed

keepalive bug #12

ccsexyz opened this issue Feb 13, 2017 · 5 comments

Comments

@ccsexyz
Copy link

ccsexyz commented Feb 13, 2017

在 session 的实现中使用了一个 goroutine 来收发心跳我觉得是有问题的,当连接断流以后, writeFrame 函数就会阻塞 keepalive 这个 goroutine, 建议心跳的收发各用一个 goroutine 或者给 writeFrame 增加超时机制.

@xtaci
Copy link
Owner

xtaci commented Feb 13, 2017

如果是因为断流的阻塞,那就应该阻塞。

@ccsexyz
Copy link
Author

ccsexyz commented Feb 13, 2017

写不出去了为什么不直接发起一个新的连接而是要阻塞在这里呢

@xtaci
Copy link
Owner

xtaci commented Feb 13, 2017

你怎么知道阻塞了

@ccsexyz
Copy link
Author

ccsexyz commented Feb 13, 2017

用dlv看出来的

@xtaci
Copy link
Owner

xtaci commented Feb 13, 2017

你先搞清楚什么叫阻塞。

@ccsexyz ccsexyz closed this as completed Feb 13, 2017
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