Skip to content
Snippets Groups Projects
Commit 70efeda4 authored by Josh Brooks's avatar Josh Brooks
Browse files

Fix segfault

parent 7fe80d35
No related branches found
No related tags found
1 merge request!23Release
...@@ -130,8 +130,10 @@ func (s *Store) saveActiveParts() { ...@@ -130,8 +130,10 @@ func (s *Store) saveActiveParts() {
jww.INFO.Printf("Saving %d active partitions", len(s.activeParts)) jww.INFO.Printf("Saving %d active partitions", len(s.activeParts))
activeList := make([]*multiPartMessage, 0, len(s.activeParts)) activeList := make([]*multiPartMessage, 0, len(s.activeParts))
for mpm := range s.activeParts { for mpm := range s.activeParts {
mpm.mux.Lock()
jww.INFO.Printf("saveActiveParts saving %v", mpm) jww.INFO.Printf("saveActiveParts saving %v", mpm)
activeList = append(activeList, mpm) activeList = append(activeList, mpm)
mpm.mux.Unlock()
} }
data, err := json.Marshal(&activeList) data, err := json.Marshal(&activeList)
...@@ -167,8 +169,8 @@ func (s *Store) loadActivePartitions() { ...@@ -167,8 +169,8 @@ func (s *Store) loadActivePartitions() {
} }
jww.INFO.Printf("loadActivePartitions found %d active", len(activeList)) jww.INFO.Printf("loadActivePartitions found %d active", len(activeList))
for i, mpm := range activeList { for _, activeMpm := range activeList {
jww.INFO.Printf("loaded %d partition: %v", i, mpm) mpm := loadOrCreateMultiPartMessage(activeMpm.Sender, activeMpm.MessageID, s.kv)
s.activeParts[mpm] = true s.activeParts[mpm] = true
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment