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

fix: 🐛 💥 为消息读取添加错误处理 #26

Merged
merged 1 commit into from
Jul 22, 2024

Conversation

x1a2h1
Copy link
Collaborator

@x1a2h1 x1a2h1 commented Jul 22, 2024

  • 修改Wsconnect 读取消息失败处理
ERRO[2024-07-22 17:20:40] read msg error: &{%!e(int=1006) %!e(string=unexpected EOF)}
ERRO[2024-07-22 17:20:40] read msg error: &{%!e(int=1006) %!e(string=unexpected EOF)}
ERRO[2024-07-22 17:20:40] read msg error: &{%!e(int=1006) %!e(string=unexpected EOF)}
ERRO[2024-07-22 17:20:40] read msg error: &{%!e(int=1006) %!e(string=unexpected EOF)}
ERRO[2024-07-22 17:20:40] read msg error: &{%!e(int=1006) %!e(string=unexpected EOF)}
ERRO[2024-07-22 17:20:40] read msg error: &{%!e(int=1006) %!e(string=unexpected EOF)}
ERRO[2024-07-22 17:20:40] read msg error: &{%!e(int=1006) %!e(string=unexpected EOF)}
ERRO[2024-07-22 17:20:40] read msg error: &{%!e(int=1006) %!e(string=unexpected EOF)}
ERRO[2024-07-22 17:20:40] read msg error: &{%!e(int=1006) %!e(string=unexpected EOF)}
ERRO[2024-07-22 17:20:40] read msg error: &{%!e(int=1006) %!e(string=unexpected EOF)}
ERRO[2024-07-22 17:20:40] read msg error: &{%!e(int=1006) %!e(string=unexpected EOF)}
ERRO[2024-07-22 17:20:40] read msg error: &{%!e(int=1006) %!e(string=unexpected EOF)}
ERRO[2024-07-22 17:20:40] read msg error: &{%!e(int=1006) %!e(string=unexpected EOF)}
ERRO[2024-07-22 17:20:40] read msg error: &{%!e(int=1006) %!e(string=unexpected EOF)}
ERRO[2024-07-22 17:20:40] read msg error: &{%!e(int=1006) %!e(string=unexpected EOF)}
ERRO[2024-07-22 17:20:40] read msg error: &{%!e(int=1006) %!e(string=unexpected EOF)}
ERRO[2024-07-22 17:20:40] read msg error: &{%!e(int=1006) %!e(string=unexpected EOF)}
ERRO[2024-07-22 17:20:40] read msg error: &{%!e(int=1006) %!e(string=unexpected EOF)}
ERRO[2024-07-22 17:20:40] read msg error: &{%!e(int=1006) %!e(string=unexpected EOF)}
ERRO[2024-07-22 17:20:40] read msg error: &{%!e(int=1006) %!e(string=unexpected EOF)}
ERRO[2024-07-22 17:20:40] read msg error: &{%!e(int=1006) %!e(string=unexpected EOF)}
ERRO[2024-07-22 17:20:40] read msg error: &{%!e(int=1006) %!e(string=unexpected EOF)}
panic: repeated read on failed websocket connection

goroutine 87 [running]:
github.com/gorilla/websocket.(*Conn).NextReader(0xc0000b8c60)
	/Users/x1a2h1/go/pkg/mod/github.com/gorilla/websocket@v1.5.2/conn.go:1034 +0x1eb
github.com/gorilla/websocket.(*Conn).ReadMessage(0x706f480?)
	/Users/x1a2h1/go/pkg/mod/github.com/gorilla/websocket@v1.5.2/conn.go:1097 +0x13
github.com/aimerny/kook-go/app/core/session.(*State).WsConnect.func1()
	/Users/x1a2h1/workspace/go/kook-go/app/core/session/session_handle.go:86 +0x7c
created by github.com/aimerny/kook-go/app/core/session.(*State).WsConnect in goroutine 1
	/Users/x1a2h1/workspace/go/kook-go/app/core/session/session_handle.go:81 +0x2d9
exit status 2

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.

2 participants