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 @@ -134,7 +134,7 @@ func TestMemberEventCoalesce_TagUpdate(t *testing.T) {
134134 Members : []Member {Member {Name : "foo" , Tags : map [string ]string {"role" : "foo" }}},
135135 }
136136
137- time .Sleep (10 * time .Millisecond )
137+ time .Sleep (30 * time .Millisecond )
138138
139139 select {
140140 case e := <- outCh :
Original file line number Diff line number Diff line change 44 "bytes"
55 "encoding/base64"
66 "encoding/json"
7- "errors"
87 "fmt"
98 "io/ioutil"
109 "log"
@@ -685,6 +684,7 @@ func (s *Serf) broadcastJoin(ltime LamportTime) error {
685684
686685// Leave gracefully exits the cluster. It is safe to call this multiple
687686// times.
687+ // If the Leave broadcast timeout, Leave() will try to finish the sequence as best effort.
688688func (s * Serf ) Leave () error {
689689 // Check the current state
690690 s .stateLock .Lock ()
@@ -727,14 +727,14 @@ func (s *Serf) Leave() error {
727727 select {
728728 case <- notifyCh :
729729 case <- time .After (s .config .BroadcastTimeout ):
730- return errors . New ( " timeout while waiting for graceful leave" )
730+ s . logger . Printf ( "[WARN] serf: timeout while waiting for graceful leave" )
731731 }
732732 }
733733
734734 // Attempt the memberlist leave
735735 err := s .memberlist .Leave (s .config .BroadcastTimeout )
736736 if err != nil {
737- return err
737+ s . logger . Printf ( "[WARN] serf: timeout waiting for leave broadcast: %s" , err . Error ())
738738 }
739739
740740 // Wait for the leave to propagate through the cluster. The broadcast
You can’t perform that action at this time.
0 commit comments