mirror of
				https://github.com/simon987/od-database.git
				synced 2025-10-26 03:56:52 +00:00 
			
		
		
		
	Re-init curl handle on error
This commit is contained in:
		
							parent
							
								
									faa9ac3ccb
								
							
						
					
					
						commit
						8b13de4a6b
					
				| @ -215,7 +215,7 @@ class HttpDirectory(RemoteDirectory): | |||||||
| 
 | 
 | ||||||
|                 return content.getvalue().decode("utf-8", errors="ignore") |                 return content.getvalue().decode("utf-8", errors="ignore") | ||||||
|             except pycurl.error: |             except pycurl.error: | ||||||
|                 self.curl.close() |                 self.close() | ||||||
|                 retries -= 1 |                 retries -= 1 | ||||||
| 
 | 
 | ||||||
|         logger.debug("TimeoutError - _fetch_body") |         logger.debug("TimeoutError - _fetch_body") | ||||||
| @ -262,7 +262,6 @@ class HttpDirectory(RemoteDirectory): | |||||||
| 
 | 
 | ||||||
|     def close(self): |     def close(self): | ||||||
|         self.curl.close() |         self.curl.close() | ||||||
|         logger.debug("Closing HTTPRemoteDirectory for " + self.base_url) |  | ||||||
|         self.init_curl() |         self.init_curl() | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user