Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e77477 commit 47d7a4eCopy full SHA for 47d7a4e
websites/code2/studygolang/src/logic/book.go
@@ -100,6 +100,9 @@ func (this *book) AddUser(user, serverId int) *UserData {
100
101
// 删除用户
102
func (this *book) DelUser(user, serverId int) {
103
+ this.rwMutex.Lock()
104
+ defer this.rwMutex.Unlock()
105
+
106
// 自己只有一个页面建立websocket连接
107
if this.users[user].Len() == 1 {
108
delete(this.users, user)
0 commit comments