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

websocket close问题 #14

Closed
chuchushijingxi opened this issue Aug 31, 2023 · 2 comments
Closed

websocket close问题 #14

chuchushijingxi opened this issue Aug 31, 2023 · 2 comments

Comments

@chuchushijingxi
Copy link

image
2.0.0版本直接传字符串进行关闭会报错。直接使用 connection.close(); 不会

@Linyuzai
Copy link
Owner

image
2.0.0版本直接传字符串进行关闭会报错。直接使用 connection.close(); 不会

因为这个最后调用的是 Spring 的接口,所以需要传CloseStatus对象,你可以自己new一个,我这边因为ServletReactive还有Netty等不同的连接对象需要传入的值不一样所以使用Object做兼容而已

@Linyuzai
Copy link
Owner

image
2.0.0版本直接传字符串进行关闭会报错。直接使用 connection.close(); 不会

2.1.0版本处理了兼容问题不会再报错

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