Eliminate separate WebRTCPeer.Connect method.

Do it as a side effect of NewWebRTCPeer.

Remove WebRTCPeer tests as they currently require invasively modifying
internal fields at different stages of construction.
This commit is contained in:
David Fifield 2020-04-24 00:05:06 -06:00
parent b48fb781ee
commit 32207d6f06
4 changed files with 10 additions and 111 deletions

View file

@ -153,7 +153,5 @@ func NewWebRTCDialer(broker *BrokerChannel, iceServers []webrtc.ICEServer) *WebR
func (w WebRTCDialer) Catch() (*WebRTCPeer, error) {
// TODO: [#25591] Fetch ICE server information from Broker.
// TODO: [#25596] Consider TURN servers here too.
connection := NewWebRTCPeer(w.webrtcConfig, w.BrokerChannel)
err := connection.Connect()
return connection, err
return NewWebRTCPeer(w.webrtcConfig, w.BrokerChannel)
}