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

feat(guacamole): 优化GuacamoleApi的WebSocket处理 #463

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sandy2008
Copy link
Contributor

  • 在WebSocket连接建立后,增加defer ws.Close()确保资源在函数退出时正确释放
  • 添加一个goroutine每30秒发送一次Ping消息,以保持连接活跃并检测死连接
  • 在读取消息的循环中设置ReadDeadline,以防止连接挂起

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

Successfully merging this pull request may close these issues.

1 participant