mirror of
https://github.com/rofafor/vdr-plugin-iptv.git
synced 2023-10-10 13:37:03 +02:00
Fixed CURL timeout and added a stale connection detection (Thanks to Daniel Ribeiro).
This commit is contained in:
parent
e9c8b8d4e0
commit
63359e4c24
4
HISTORY
4
HISTORY
@ -264,3 +264,7 @@ VDR Plugin 'iptv' Revision History
|
|||||||
- Updated for vdr-2.2.0.
|
- Updated for vdr-2.2.0.
|
||||||
- Updated German translations (Thanks to Frank Neumann).
|
- Updated German translations (Thanks to Frank Neumann).
|
||||||
- Updated Lithuanian translations (Thanks to Valdemaras Pipiras).
|
- Updated Lithuanian translations (Thanks to Valdemaras Pipiras).
|
||||||
|
|
||||||
|
2015-XX-XX: Version 2.2.1
|
||||||
|
|
||||||
|
- Fixed CURL timeout and added a stale connection detection (Thanks to Daniel Ribeiro).
|
||||||
|
2
iptv.c
2
iptv.c
@ -21,7 +21,7 @@
|
|||||||
#define GITVERSION ""
|
#define GITVERSION ""
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char VERSION[] = "2.2.0" GITVERSION;
|
const char VERSION[] = "2.2.1" GITVERSION;
|
||||||
static const char DESCRIPTION[] = trNOOP("Experience the IPTV");
|
static const char DESCRIPTION[] = trNOOP("Experience the IPTV");
|
||||||
|
|
||||||
class cPluginIptv : public cPlugin {
|
class cPluginIptv : public cPlugin {
|
||||||
|
@ -277,8 +277,9 @@ bool cIptvProtocolCurl::Connect()
|
|||||||
iptv_curl_easy_setopt(handleM, CURLOPT_NETRC_FILE, *netrc);
|
iptv_curl_easy_setopt(handleM, CURLOPT_NETRC_FILE, *netrc);
|
||||||
|
|
||||||
// Set timeouts
|
// Set timeouts
|
||||||
iptv_curl_easy_setopt(handleM, CURLOPT_TIMEOUT, (long)eConnectTimeoutS);
|
|
||||||
iptv_curl_easy_setopt(handleM, CURLOPT_CONNECTTIMEOUT, (long)eConnectTimeoutS);
|
iptv_curl_easy_setopt(handleM, CURLOPT_CONNECTTIMEOUT, (long)eConnectTimeoutS);
|
||||||
|
iptv_curl_easy_setopt(handleM, CURLOPT_LOW_SPEED_LIMIT, (long)eLowSpeedLimitBytes);
|
||||||
|
iptv_curl_easy_setopt(handleM, CURLOPT_LOW_SPEED_TIME, (long)eLowSpeedTimeoutS);
|
||||||
|
|
||||||
// Set user-agent
|
// Set user-agent
|
||||||
iptv_curl_easy_setopt(handleM, CURLOPT_USERAGENT, *cString::sprintf("vdr-%s/%s", PLUGIN_NAME_I18N, VERSION));
|
iptv_curl_easy_setopt(handleM, CURLOPT_USERAGENT, *cString::sprintf("vdr-%s/%s", PLUGIN_NAME_I18N, VERSION));
|
||||||
|
@ -30,6 +30,8 @@ private:
|
|||||||
};
|
};
|
||||||
enum {
|
enum {
|
||||||
eConnectTimeoutS = 5, // in seconds
|
eConnectTimeoutS = 5, // in seconds
|
||||||
|
eLowSpeedTimeoutS = 3, // in seconds
|
||||||
|
eLowSpeedLimitBytes = 100, // in bytes per second
|
||||||
eMaxDownloadSpeedMBits = 20, // in megabits per second
|
eMaxDownloadSpeedMBits = 20, // in megabits per second
|
||||||
eKeepAliveIntervalMs = 300000 // in milliseconds
|
eKeepAliveIntervalMs = 300000 // in milliseconds
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user