mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
curlsink: catch an unknown error
In this case the socket callback has not been called by libcurl and the curlsink has not been notified about any connection problems by libcurl. This indicates that it's a bug in libcurl so catch it as an unknown error. https://bugzilla.gnome.org/show_bug.cgi?id=754432
This commit is contained in:
parent
8cde41e68c
commit
0fbbbd042a
1 changed files with 9 additions and 0 deletions
|
@ -980,6 +980,15 @@ handle_transfer (GstCurlBaseSink * sink)
|
|||
|
||||
GST_OBJECT_LOCK (sink);
|
||||
if (sink->socket_type == CURLSOCKTYPE_ACCEPT) {
|
||||
/* FIXME: remove this again once we can depend on libcurl > 7.44.0,
|
||||
* see https://github.com/bagder/curl/issues/405.
|
||||
*/
|
||||
if (G_UNLIKELY (sink->fd.fd < 0)) {
|
||||
sink->error = g_strdup_printf ("unknown error");
|
||||
retval = GST_FLOW_ERROR;
|
||||
GST_OBJECT_UNLOCK (sink);
|
||||
goto fail;
|
||||
}
|
||||
if (!gst_poll_remove_fd (sink->fdset, &sink->fd)) {
|
||||
sink->error = g_strdup_printf ("failed to remove fd");
|
||||
retval = GST_FLOW_ERROR;
|
||||
|
|
Loading…
Reference in a new issue