Skip to content
This repository has been archived by the owner on Aug 17, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant