File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -52,10 +52,10 @@ func (p *PushTask) distributionTask() {
52
52
if pushJob .Type == 1 {
53
53
GetRoomManage ().PushAll (& WSMessage {
54
54
Type : pushJob .PushType ,
55
- Data : pushJob .info ,
55
+ Data : pushJob .Info ,
56
56
})
57
57
} else if pushJob .Type == 2 {
58
- p .JobChan [pushJob .roomId ] <- pushJob
58
+ p .JobChan [pushJob .RoomId ] <- pushJob
59
59
}
60
60
}
61
61
}
@@ -71,7 +71,7 @@ func (p *PushTask) pushWork(roomId int) {
71
71
case job = <- p .JobChan [roomId ]:
72
72
if err = GetRoomManage ().PushRoom (roomId , & WSMessage {
73
73
Type : job .PushType ,
74
- Data : job .info ,
74
+ Data : job .Info ,
75
75
}); err != nil {
76
76
fmt .Println (err )
77
77
}
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ func (w *WsConnection) CloseConn() {
34
34
w .close ()
35
35
GetRoomManage ().DelConn (w )
36
36
w .addRoom .Range (func (key , _ interface {}) bool {
37
- _ = GetRoomManage ().LeaveRoom (key .(int ), w )
37
+ _ = GetRoomManage ().LeaveRoom (key .(int ), w . GetWsId () )
38
38
w .addRoom .Delete (key )
39
39
return true
40
40
})
You can’t perform that action at this time.
0 commit comments