refactor: better representation of 3-valued target state

This commit is contained in:
Matthias Radestock committed 2015-10-01 20:05:12 +01:00
1 parent 520c7286c4
commit b8b3e6f9cd
2 files changed
+17 -12

No files matched your search

+2 -2
View File
@@ -175,12 +175,12 @@ func NewLocalConnectionStatusSlice(cm *ConnectionMaker) []LocalConnectionStatus
for address, target := range cm.targets {
var state, info string
switch {
case target.connected:
case target.state == TargetConnected:
continue
case target.lastError == nil:
state = "connecting"
info = ""
case target.attempting:
case target.state == TargetAttempting:
state = "retrying"
info = target.lastError.Error()
default: