mirror of
https://github.com/zhigang1992/mitmproxy.git
synced 2026-01-12 22:48:54 +08:00
Fix a rare crash when a new cert is generated during cerdir removal.
This commit is contained in:
@@ -445,8 +445,11 @@ class ProxyServer(ServerBase):
|
||||
self.RequestHandlerClass(self.config, request, client_address, self, self.masterq)
|
||||
|
||||
def shutdown(self):
|
||||
shutil.rmtree(self.certdir)
|
||||
ServerBase.shutdown(self)
|
||||
try:
|
||||
shutil.rmtree(self.certdir)
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
|
||||
# Command-line utils
|
||||
|
||||
Reference in New Issue
Block a user