mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-10-17 10:27:22 +00:00
Fix race in shutdown: context should be shut down in case of error.
This commit is contained in:
1 parent
1902f38e6b
commit
410caa6141
2 files changed
+13
-3
No files matched your search
+9
-3
@@ -139,7 +139,13 @@ func ShutdownContext() {
|
||||
context.fileMemProfile = nil
|
||||
}
|
||||
}
|
||||
context.database.Close()
|
||||
context.downloader.Shutdown()
|
||||
context.progress.Shutdown()
|
||||
if context.database != nil {
|
||||
context.database.Close()
|
||||
}
|
||||
if context.downloader != nil {
|
||||
context.downloader.Shutdown()
|
||||
}
|
||||
if context.progress != nil {
|
||||
context.progress.Shutdown()
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user