Fix TURN credentials renewal (#394)

Update conn config with new TURN credentials

Updated Signal connection timeout to 5s
This commit is contained in:
Misha Bragin
2022-07-21 21:07:38 +01:00
committed by GitHub
parent a3c5fa1307
commit 275d364df6
3 changed files with 15 additions and 3 deletions

View File

@@ -75,6 +75,11 @@ func (conn *Conn) GetConf() ConnConfig {
return conn.config
}
// UpdateConf updates the connection config
func (conn *Conn) UpdateConf(conf ConnConfig) {
conn.config = conf
}
// NewConn creates a new not opened Conn to the remote peer.
// To establish a connection run Conn.Open
func NewConn(config ConnConfig, statusRecorder *nbStatus.Status) (*Conn, error) {
@@ -415,7 +420,7 @@ func (conn *Conn) SetSignalCandidate(handler func(candidate ice.Candidate) error
// and then signals them to the remote peer
func (conn *Conn) onICECandidate(candidate ice.Candidate) {
if candidate != nil {
// log.Debugf("discovered local candidate %s", candidate.String())
log.Debugf("discovered local candidate %s", candidate.String())
go func() {
err := conn.signalCandidate(candidate)
if err != nil {