Does RtmpOnlyAudio handle connection closures initiated by the server? #1930
Replies: 9 comments 5 replies
-
Hello, This maybe is an issue in my side. That message is maybe ignored and the library never detect that the socket is closed. |
Beta Was this translation helpful? Give feedback.
-
I don't have any error level logs in log cat. When I start streaming I see in logs next lines (a lot): After some time, the server closes the connection, and RtmpSender doesn’t write any logs, but BufferPoolAccessor2 keeps writing logs. I didn’t find anything else suspicious or useful. |
Beta Was this translation helpful? Give feedback.
-
No RtmpSender I want logs from RtmpClient |
Beta Was this translation helpful? Give feedback.
-
It looks like I have not logs after closing connection. After these events I have a lot of RtmpSender and then - nothing |
Beta Was this translation helpful? Give feedback.
-
By the way, when I turn off the internet using Airplane mode, I see the same behavior — no errors occur. |
Beta Was this translation helpful? Give feedback.
-
That is weird, do you have a way to share me an environment to tests it? If not, I can try create a branch with more logs to debug the case |
Beta Was this translation helpful? Give feedback.
-
Unfortunately, I can't share my environment with you. |
Beta Was this translation helpful? Give feedback.
-
Ok, then try this PR: Also, let me know this. Are you using an emulator to test? |
Beta Was this translation helpful? Give feedback.
-
Hello. I tried your PR in my project. Unfortunately it doesn't work. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello. My app uses RtmpOnlyAudio (v2.6.4) to create an audio stream via RTMPS. It works, and clients can listen to this stream.
When the server detects that no one is listening to the stream anymore, it sends an Action Message Format (AMF) message "NetConnection.Connect.Closed" and then closes the connection. However, RtmpOnlyAudio doesn’t receive any errors or events, and it looks like the stream is still working.
I haven’t found any way to receive AMF messages directly and only use the ConnectChecker listener.
It triggers onConnectionStarted and onConnectionSuccess, but onDisconnect or onConnectionFailed are never called.
Is this a library issue, or am I doing something incorrectly? How do I can close the stream in my case?
Thanks for help
Beta Was this translation helpful? Give feedback.
All reactions