If rtsp sever is terminated first. It seems that rtsp client can't teardownMediaSession(*session) and teardownMediaSubsession(*subsession). And rtspclient can't release its resources.