mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
curl: transfer hangs in case connection was cut between client and server
https://bugzilla.gnome.org/show_bug.cgi?id=774485
This commit is contained in:
parent
1ddbd773f8
commit
2c3aa2f09c
1 changed files with 15 additions and 0 deletions
|
@ -705,6 +705,21 @@ gst_curl_base_sink_transfer_set_common_options_unlocked (GstCurlBaseSink * sink)
|
|||
curl_easy_strerror (res));
|
||||
return FALSE;
|
||||
}
|
||||
/* Time out in case transfer speed in bytes per second stay below
|
||||
* CURLOPT_LOW_SPEED_LIMIT during CURLOPT_LOW_SPEED_TIME */
|
||||
res = curl_easy_setopt (sink->curl, CURLOPT_LOW_SPEED_LIMIT, 1L);
|
||||
if (res != CURLE_OK) {
|
||||
sink->error = g_strdup_printf ("failed to set low speed limit: %s",
|
||||
curl_easy_strerror (res));
|
||||
return FALSE;
|
||||
}
|
||||
res = curl_easy_setopt (sink->curl, CURLOPT_LOW_SPEED_TIME,
|
||||
(long)sink->timeout);
|
||||
if (res != CURLE_OK) {
|
||||
sink->error = g_strdup_printf ("failed to set low speed time: %s",
|
||||
curl_easy_strerror (res));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
GST_LOG ("common options set");
|
||||
return TRUE;
|
||||
|
|
Loading…
Reference in a new issue