Log ICE reconnected. (#2999)
To increase visibility of ICE reconnect, logging reconnected at Infow level. Otherwise, it is hard to see if an ICE restart finished successfully. Also, cleaning up ICEConnectionDetails a bit. Just separate out read-only fields into its own struct and use it for read-only export.
This commit is contained in:
@@ -482,15 +482,15 @@ func (t *TransportManager) SubscriberAsPrimary() bool {
|
||||
return t.params.SubscriberAsPrimary
|
||||
}
|
||||
|
||||
func (t *TransportManager) GetICEConnectionDetails() []*types.ICEConnectionDetails {
|
||||
details := make([]*types.ICEConnectionDetails, 0, 2)
|
||||
func (t *TransportManager) GetICEConnectionInfo() []*types.ICEConnectionInfo {
|
||||
infos := make([]*types.ICEConnectionInfo, 0, 2)
|
||||
for _, pc := range []*PCTransport{t.publisher, t.subscriber} {
|
||||
cd := pc.GetICEConnectionDetails()
|
||||
if cd.HasCandidates() {
|
||||
details = append(details, cd.Clone())
|
||||
info := pc.GetICEConnectionInfo()
|
||||
if info.HasCandidates() {
|
||||
infos = append(infos, info)
|
||||
}
|
||||
}
|
||||
return details
|
||||
return infos
|
||||
}
|
||||
|
||||
func (t *TransportManager) getTransport(isPrimary bool) *PCTransport {
|
||||
|
||||
Reference in New Issue
Block a user