Gstreamer RTSP server sharing pipeline

I have an application developed which provides media from a UDP multicast source. So far I understood that the Media factory creates a new pipeline for each new client. I used gst_rtsp_media_factory_set_shared() to use a single pipeline so that it can be shared among clients. However, I observed that when one client sends a TEARDOWN the media gets suspended for other client as well.
My pipeline has a probe in between which emits frames on a socket. The socket stops emitting when one client gets disconnected.

Is there anything I can configure additionally? Or any direction I need to investigate further.

You could use the new rsinter elements (or a custom appsink → multiple appsrc approach) to have one pipeline always running and produce data, and then (shared or not) RTSP media factories retrieve the data from that one pipeline.

The shared media mode in gst-rtsp-server has all kinds of problem like the one you describe.