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