Skip to content

聊天室的链表循环处理有问题 #17

@y6828863

Description

@y6828863

for ch := waitingList.Back(); ch != nil; ch = ch.Prev() { ch.Value.(chan bool) <- true waitingList.Remove(ch) }
chatroom.go 文件中的第76行---79行的链表循环中删除节点的代码操作是有问题的,节点被删除后继续循环操作导致链表某些元素无法真正的被遍历处理,进而部分聊天室的成员会由于chanel阻塞而无法获取到消息,请处理下。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions