Gstreamer last frame freeze when no internet connection

I`m using Gstreamer to reach rtsp stream. When i use it with internet connection and with my lan - its ok, when i lost lan connection. But when i use it without internet connection, all my program just freeze for 20s ±.

Pipeline: s = “rtspsrc protocols=tcp location=” + s + " latency=0 tcp-timeout=1 buffer-mode=1 ! queue ! rtph264depay ! h264parse ! decodebin ! videoconvert ! videorate ! video/x-raw,framerate=25/1 ! appsink";