diff --git a/gst-libs/gst/rtsp/gstrtspconnection.c b/gst-libs/gst/rtsp/gstrtspconnection.c index cfa3c002f9..da9f51001e 100644 --- a/gst-libs/gst/rtsp/gstrtspconnection.c +++ b/gst-libs/gst/rtsp/gstrtspconnection.c @@ -426,6 +426,7 @@ do_connect (const gchar * ip, guint16 port, GSocket ** socket_out, if (!g_socket_connect (socket, saddr, cancellable, &err)) { if (!g_error_matches (err, G_IO_ERROR, G_IO_ERROR_PENDING)) goto sys_error; + g_clear_error (&err); } else { goto done; }