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

KcpClient exceptionCaught是否调用错方法 #8

Open
omanhom opened this issue Oct 19, 2017 · 2 comments
Open

KcpClient exceptionCaught是否调用错方法 #8

omanhom opened this issue Oct 19, 2017 · 2 comments

Comments

@omanhom
Copy link

omanhom commented Oct 19, 2017

@OverRide
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception
{
KcpClient.this.handleException(cause, null);
KcpClient.this.close();
}

KcpClient.this.close(); 是否调整为KcpClient.this.handleClose()更为合理

@omanhom omanhom changed the title KcpClient exceptionCaught是否应该调用错方法 KcpClient exceptionCaught是否调用错方法 Oct 19, 2017
@omanhom
Copy link
Author

omanhom commented Oct 23, 2017

我大概明白原因了,设计KcpClient.this.close(); 是网络层,KcpClient.this.handleClose()属于kcp业务层

@omanhom omanhom closed this as completed Oct 23, 2017
@beykery
Copy link
Owner

beykery commented Jan 1, 2018

这个地方,还是有问题。
需要考虑下通知业务层去处理exception事件和close事件。

@beykery beykery reopened this Jan 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants