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) {
134
134
Members : []Member {Member {Name : "foo" , Tags : map [string ]string {"role" : "foo" }}},
135
135
}
136
136
137
- time .Sleep (10 * time .Millisecond )
137
+ time .Sleep (30 * time .Millisecond )
138
138
139
139
select {
140
140
case e := <- outCh :
Original file line number Diff line number Diff line change 4
4
"bytes"
5
5
"encoding/base64"
6
6
"encoding/json"
7
- "errors"
8
7
"fmt"
9
8
"io/ioutil"
10
9
"log"
@@ -685,6 +684,7 @@ func (s *Serf) broadcastJoin(ltime LamportTime) error {
685
684
686
685
// Leave gracefully exits the cluster. It is safe to call this multiple
687
686
// times.
687
+ // If the Leave broadcast timeout, Leave() will try to finish the sequence as best effort.
688
688
func (s * Serf ) Leave () error {
689
689
// Check the current state
690
690
s .stateLock .Lock ()
@@ -727,14 +727,14 @@ func (s *Serf) Leave() error {
727
727
select {
728
728
case <- notifyCh :
729
729
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" )
731
731
}
732
732
}
733
733
734
734
// Attempt the memberlist leave
735
735
err := s .memberlist .Leave (s .config .BroadcastTimeout )
736
736
if err != nil {
737
- return err
737
+ s . logger . Printf ( "[WARN] serf: timeout waiting for leave broadcast: %s" , err . Error ())
738
738
}
739
739
740
740
// Wait for the leave to propagate through the cluster. The broadcast
You can’t perform that action at this time.
0 commit comments