Skip to content

解决connection模块写时,出现往空的channel写的panic错误#286

Merged
aceld merged 1 commit into
aceld:masterfrom
xiongyuhmba:master
Nov 24, 2023
Merged

解决connection模块写时,出现往空的channel写的panic错误#286
aceld merged 1 commit into
aceld:masterfrom
xiongyuhmba:master

Conversation

@xiongyuhmba

Copy link
Copy Markdown

为了不使用锁,此处去掉主动关闭close(c.msgBuffChan) 让系统自动GC 该channel。可避免写数据时出现竞争:往关闭的channel写数据的panic错误

@aceld
aceld merged commit 4951f22 into aceld:master Nov 24, 2023
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