Skip to content

Commit 6ac93dd

Browse files
authored
Use error that self-check looks for (#713)
* Use error that self-check looks for * error
1 parent 89f586d commit 6ac93dd

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

engine.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ func (e *RTCEngine) JoinContext(
248248
if verr := e.validate(ctx, url, token, connectParams, ""); verr != nil {
249249
return false, verr
250250
}
251-
return false, err
251+
return false, ErrCannotConnectSignal
252252
}
253253

254254
if err = e.waitUntilConnected(); err != nil {
@@ -768,7 +768,7 @@ func (e *RTCEngine) resumeConnection() error {
768768
); verr != nil {
769769
return verr
770770
}
771-
return err
771+
return ErrCannotConnectSignal
772772
}
773773

774774
e.signalTransport.Start()

errors.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ var (
3030
ErrCannotFindTrack = errors.New("could not find the track")
3131
ErrInvalidMessageType = signalling.ErrInvalidMessageType
3232
ErrInvalidParameter = signalling.ErrInvalidParameter
33+
ErrCannotConnectSignal = errors.New("could not establish signal connection")
3334
ErrNoPeerConnection = errors.New("peer connection not established")
3435
ErrAborted = errors.New("operation was aborted")
3536
)

0 commit comments

Comments
 (0)