exclude stale info from ConnectionMaker.String()

This got broken in 7bd0f7dbae.
This commit is contained in:
Matthias Radestock committed 2015-04-12 12:23:32 +01:00
1 parent 6409a8647c
commit 1275bb24e5
1 file changed
+6
+6
View File
@@ -79,6 +79,12 @@ func (cm *ConnectionMaker) Refresh() {
}
func (cm *ConnectionMaker) String() string {
// We need to Refresh first in order to clear out any 'attempting'
// connections from cm.targets that have been established since
// the last run of cm.checkStateAndAttemptConnections. These
// entries are harmless but do represent stale state that we do
// not want to report.
cm.Refresh()
resultChan := make(chan string, 0)
cm.actionChan <- func() bool {
var buf bytes.Buffer