Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0b8f250

Browse files
committed
bugfix
1 parent 121c63d commit 0b8f250

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/logic/book.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,6 @@ func (this *book) AddUser(user, serverId int, isUid bool) *UserData {
125125
if userData, ok = this.users[user]; ok {
126126
this.rwMutex.Unlock()
127127

128-
logger.Infoln("user:", user, "had enter")
129-
130128
userData.InitMessageQueue(serverId)
131129
userData.onlineDuartion += time.Now().Sub(userData.lastAccessTime)
132130
userData.lastAccessTime = time.Now()
@@ -143,6 +141,8 @@ func (this *book) AddUser(user, serverId int, isUid bool) *UserData {
143141

144142
this.rwMutex.Unlock()
145143

144+
logger.Infoln("user:", user, "had enter")
145+
146146
onlineInfo := map[string]int{"online": length}
147147
// 在线人数超过历史最高
148148
if length > MaxOnlineNum() {

0 commit comments

Comments
 (0)