File tree Expand file tree Collapse file tree
rtmp/src/main/java/com/pedro/rtmp/rtmp Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -304,7 +304,6 @@ class RtmpClient(private val connectChecker: ConnectChecker) {
304304 while (scope.isActive && isStreaming) {
305305 val error = runCatching {
306306 if (isAlive()) {
307- delay(2000 )
308307 // ignore packet after connect if tunneled to avoid spam idle
309308 if (! tunneled) handleMessages()
310309 } else {
@@ -315,7 +314,7 @@ class RtmpClient(private val connectChecker: ConnectChecker) {
315314 }
316315 }.exceptionOrNull()
317316 if (error != null && ConnectionFailed .parse(error.validMessage()) != ConnectionFailed .TIMEOUT ) {
318- scope.cancel()
317+ // scope.cancel()
319318 }
320319 }
321320 }
@@ -490,7 +489,7 @@ class RtmpClient(private val connectChecker: ConnectChecker) {
490489 rtmpSender.start()
491490 publishPermitted = true
492491 }
493- " NetConnection.Connect.Rejected" , " NetStream.Publish.BadName" -> {
492+ " NetConnection.Connect.Rejected" , " NetStream.Publish.BadName" , " NetConnection.Connect.Closed " -> {
494493 onMainThread {
495494 connectChecker.onConnectionFailed(" onStatus: $code " )
496495 }
You can’t perform that action at this time.
0 commit comments