mirror of
				https://github.com/9001/copyparty.git
				synced 2025-11-03 21:43:12 +00:00 
			
		
		
		
	better recovery from i/o errors
This commit is contained in:
		@@ -1707,12 +1707,16 @@ class HttpCli(object):
 | 
				
			|||||||
                        ofs += len(buf)
 | 
					                        ofs += len(buf)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    self.log("clone {} done".format(cstart[0]))
 | 
					                    self.log("clone {} done".format(cstart[0]))
 | 
				
			||||||
            finally:
 | 
					
 | 
				
			||||||
                if not fpool:
 | 
					                if not fpool:
 | 
				
			||||||
                    f.close()
 | 
					                    f.close()
 | 
				
			||||||
                else:
 | 
					                else:
 | 
				
			||||||
                    with self.mutex:
 | 
					                    with self.mutex:
 | 
				
			||||||
                        self.u2fh.put(path, f)
 | 
					                        self.u2fh.put(path, f)
 | 
				
			||||||
 | 
					            except:
 | 
				
			||||||
 | 
					                # maybe busted handle (eg. disk went full)
 | 
				
			||||||
 | 
					                f.close()
 | 
				
			||||||
 | 
					                raise
 | 
				
			||||||
        finally:
 | 
					        finally:
 | 
				
			||||||
            x = self.conn.hsrv.broker.ask("up2k.release_chunk", ptop, wark, chash)
 | 
					            x = self.conn.hsrv.broker.ask("up2k.release_chunk", ptop, wark, chash)
 | 
				
			||||||
            x.get()  # block client until released
 | 
					            x.get()  # block client until released
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user