Open JamesTerm opened 5 years ago
There is another way to reproduce this issue...
On the client native sample app:
Note: the stress here is that the caller is not connected, so I expect the message to return message failed.
On the caller side:
I'd expect this to succeed, but instead it gives the same error message as before.
I met same problem when run windows p2p sample. How to fix this problem?
I hope to hear some response on this... at the very least it should be flagged as p2p and bug. The key is peerconnectionchannel.cc: line 106 as a starting point. I have some other tasks that are on the front burner, but if this case is still open by then... I may take a look at how to solve it.
Ok with today's epic merge of branch 76. (pr #216 ).. I will eventually come back to this issue as time allows and see if it is still present.
For now... I've worked around this problem by monitoring when the caller logs off. I found that OnServerDisconnected() is currently not used for p2p, so I'm using this as a gateway signal to the client code in order to keep changes in the sdk to a minimum. When the caller logs off, I then issue a reset to the app client code which spawns a DPC that disconnects, waits a second, and reconnects. (see initial entry about resetting the signalingchannel for that to work). I do not plan to submit these changes for pr as I feel it is a work-around solution, while mentioning this now to help others in the short term.
This solution is not perfect in that a caller may drop the call without logging off, in which case I can monitor the stream or provide a manual reset work-around, both of which do the same solution, but have their own triggering methods to get there.
As an addendum to the last entry I've handled the stress of a caller dropping the call by use of GetConnectionStats()... loose polling this when the video feed is lost. This will let me know the moment the connection is lost.
This issue is very similar and created from issue #121
Ideally, we want to leave the desktop application (Callee / client native) acting as a server for callers, and to keep it logged in to signaling server, which callers are able to come and go as needed.
In our testing environment to reproduce issue, we use the sample application, and the sample web page (as the caller). Then do the following steps:
This time I get the following: (peerconnectionchannel.cc:106): Attempt to perform PeerConnection operation when it is closed.
I would hope this can work, Chunbo has said the following about this: For the use scenario you mentioned, you want functionality like stop-share/share-again is about reconnection or new connection, which takes times for SDK to run detection in order to decide the next step. Similar things to the case like logging off/back on if you're talking about the signaling connection to signaling server, the streaming peer connection is different from signaling connections: The logging off of signaling will not affect the ongoing streaming.
Ok... so one other step that makes this more interesting:
This has no effect... when sharing the camera it will yield the same result.
What does work, is if I disconnect, and alter the code to reset signalingchannel where io_ (sio::client) is reset. When this happens if will successfully stream again, so I am not sure if this is the fix or if this is a work-around. As a starting point it would be nice to know if the owt-client_native should be able to handle stresses like this.