mirror of
https://github.com/netbirdio/ice.git
synced 2026-05-22 17:10:58 -07:00
Change type of ConnectionState constants
This commit is contained in:
@@ -435,6 +435,7 @@ func (a *Agent) connectivityChecks() {
|
||||
a.updateConnectionState(ConnectionStateFailed)
|
||||
return
|
||||
}
|
||||
default:
|
||||
}
|
||||
|
||||
a.selector.ContactCandidates()
|
||||
|
||||
+4
-1
@@ -582,6 +582,7 @@ func TestConnectionStateCallback(t *testing.T) {
|
||||
close(isFailed)
|
||||
case ConnectionStateClosed:
|
||||
close(isClosed)
|
||||
default:
|
||||
}
|
||||
})
|
||||
if err != nil {
|
||||
@@ -1161,9 +1162,9 @@ func TestConnectionStateConnectingToFailed(t *testing.T) {
|
||||
isFailed.Done()
|
||||
case ConnectionStateChecking:
|
||||
isChecking.Done()
|
||||
case ConnectionStateConnected:
|
||||
case ConnectionStateCompleted:
|
||||
t.Errorf("Unexpected ConnectionState: %v", c)
|
||||
default:
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1357,6 +1358,7 @@ func TestCloseInConnectionStateCallback(t *testing.T) {
|
||||
assert.NoError(t, aAgent.Close())
|
||||
case ConnectionStateClosed:
|
||||
close(isClosed)
|
||||
default:
|
||||
}
|
||||
})
|
||||
if err != nil {
|
||||
@@ -1513,6 +1515,7 @@ func TestLiteLifecycle(t *testing.T) {
|
||||
close(bDisconnected)
|
||||
case ConnectionStateFailed:
|
||||
close(bFailed)
|
||||
default:
|
||||
}
|
||||
}))
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ type ConnectionState int
|
||||
// List of supported States
|
||||
const (
|
||||
// ConnectionStateUnknown represents an unknown state
|
||||
ConnectionStateUnknown = iota
|
||||
ConnectionStateUnknown ConnectionState = iota
|
||||
|
||||
// ConnectionStateNew ICE agent is gathering addresses
|
||||
ConnectionStateNew
|
||||
|
||||
Reference in New Issue
Block a user