Skip to content

Commit

Permalink
avoid parse no errors
Browse files Browse the repository at this point in the history
  • Loading branch information
pedroSG94 committed Sep 24, 2024
1 parent ea83e4e commit 1512feb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rtmp/src/main/java/com/pedro/rtmp/rtmp/RtmpClient.kt
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ class RtmpClient(private val connectChecker: ConnectChecker) {
scope.cancel()
}
}.exceptionOrNull()
if (ConnectionFailed.parse(error?.validMessage() ?: "") != ConnectionFailed.TIMEOUT) {
if (error != null && ConnectionFailed.parse(error.validMessage()) != ConnectionFailed.TIMEOUT) {
scope.cancel()
}
}
Expand Down
2 changes: 1 addition & 1 deletion rtsp/src/main/java/com/pedro/rtsp/rtsp/RtspClient.kt
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ class RtspClient(private val connectChecker: ConnectChecker) {
scope.cancel()
}
}.exceptionOrNull()
if (ConnectionFailed.parse(error?.validMessage() ?: "") != ConnectionFailed.TIMEOUT) {
if (error != null && ConnectionFailed.parse(error.validMessage()) != ConnectionFailed.TIMEOUT) {
scope.cancel()
}
}
Expand Down
2 changes: 1 addition & 1 deletion srt/src/main/java/com/pedro/srt/srt/SrtClient.kt
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ class SrtClient(private val connectChecker: ConnectChecker) {
scope.cancel()
}
}.exceptionOrNull()
if (ConnectionFailed.parse(error?.validMessage() ?: "") != ConnectionFailed.TIMEOUT) {
if (error != null && ConnectionFailed.parse(error.validMessage()) != ConnectionFailed.TIMEOUT) {
scope.cancel()
}
}
Expand Down

0 comments on commit 1512feb

Please sign in to comment.