russelltg/srt-rs

Multiplex server drops a client after a couple of seconds.

Lighty0410 opened this issue · 0 comments

Hey everyone ! Since the recent repo updates, the multiplex server doesn't seem to be working. I tried to apply options and thought it was the case, but nope. All the same issues even when copy&pasting the multiplex.rs example.
What's going on: whenever a client connects to the server, the client disconnects after a while (maybe around 5 seconds).
For example (look at the timestamps) :

[2021-12-14T14:30:38Z INFO  untitled3] SRT Multiplex Server is listening on port: 4444
[2021-12-14T14:30:42Z INFO  untitled3] New client connected: (ip_port: 127.0.0.1:58701, sockid: 10679579)
[2021-12-14T14:30:47Z INFO  untitled3] Send to client: (ip_port: 127.0.0.1:58701, sockid: 10679579) error: Custom { kind: NotConnected, error: SendError { kind: Disconnected } }
[2021-12-14T14:30:47Z INFO  untitled3] Client (ip_port: 127.0.0.1:58701, sockid: 10679579) disconnected

As you can see, after 5 seconds since the client has connected to the server the connection drops. It happens both for FFmpeg and a client application using this crate.

Example:
https://gist.github.com/Lighty0410/2b7b3f0695dd7f0b26b323f7a9f9db73 (slightly modified multiplex.rs, basically restreaming around 50mb/sec mpegts stream (in my case) )

Thanks in advance !