Skip to content

Commit

Permalink
Soji: Fix concurrent map writes panic.
Browse files Browse the repository at this point in the history
  • Loading branch information
cschomburg committed Nov 13, 2016
1 parent 11be7f9 commit 2d160a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions cmd/util/soji/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ func relay() {
c, err := app.ClientDial(sarif.ClientInfo{
Name: "soji/" + sarif.GenerateId(),
})
c.HandleConcurrent = false
app.Must(err)

c.Subscribe("status", "", func(msg sarif.Message) {
Expand Down
4 changes: 2 additions & 2 deletions core/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ func (s *Server) InitModules() error {

func (s *Server) findConfigStore() error {
time.Sleep(100 * time.Millisecond)
for try := 1; try <= 3; try++ {
for try := 1; try <= 5; try++ {
req := s.Client.Request(sarif.Message{
Action: "proto/discover/store/get/config",
Destination: s.ServerConfig.ConfigStore,
Expand All @@ -211,7 +211,7 @@ func (s *Server) findConfigStore() error {
}
s.configStoreInitialized = true
return nil
case <-time.After(500 * time.Duration(try) * time.Millisecond):
case <-time.After(1 * time.Duration(try) * time.Second):
}
}

Expand Down

0 comments on commit 2d160a8

Please sign in to comment.