Skip to content
This repository has been archived by the owner on Nov 10, 2020. It is now read-only.

change Session.Cmsg to Session.cmsg and provide wrapper functions #37

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Next Next commit
Update memtopics.go
writing smu and rmu should get lock
  • Loading branch information
shamork committed Mar 17, 2016
commit ab45444a27bd80ca2db77da8e1b082e2be0bdd60
4 changes: 4 additions & 0 deletions topics/memtopics.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,12 @@ func (this *memTopics) Retained(topic []byte, msgs *[]*message.PublishMessage) e
}

func (this *memTopics) Close() error {
this.smu.Lock()
this.sroot = nil
this.smu.Unlock()
this.rmu.Lock()
this.rroot = nil
this.rmu.Unlock()
return nil
}

Expand Down