Skip to content

Commit

Permalink
Fix usage of Cond.Signal().
Browse files Browse the repository at this point in the history
  • Loading branch information
kmfukuyama committed Sep 14, 2020
1 parent b857851 commit 72de1f4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion supervisor.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ package main

import (
"fmt"
"github.com/ochinchina/supervisord/config"
"net/http"
"os"
"strings"
"sync"
"time"

"github.com/ochinchina/supervisord/config"
"github.com/ochinchina/supervisord/events"
"github.com/ochinchina/supervisord/faults"
"github.com/ochinchina/supervisord/logger"
Expand Down Expand Up @@ -520,7 +520,9 @@ func (s *Supervisor) startHTTPServer() {
addr,
s,
func() {
cond.L.Lock()
cond.Signal()
cond.L.Unlock()
})
cond.Wait()
}
Expand All @@ -539,7 +541,9 @@ func (s *Supervisor) startHTTPServer() {
sockFile,
s,
func() {
cond.L.Lock()
cond.Signal()
cond.L.Unlock()
})
cond.Wait()
}
Expand Down

0 comments on commit 72de1f4

Please sign in to comment.