summaryrefslogtreecommitdiff
path: root/cleanup.go
diff options
context:
space:
mode:
Diffstat (limited to 'cleanup.go')
-rw-r--r--cleanup.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/cleanup.go b/cleanup.go
index cfe659d..0d7d89c 100644
--- a/cleanup.go
+++ b/cleanup.go
@@ -7,13 +7,13 @@ import (
)
func cleanup() {
- if err := instance.Close(); err != nil {
- log.Printf("error closing instance: %s", err)
- }
-
ctx, cancel := context.WithTimeout(context.Background(), time.Second)
defer cancel()
if err := server.Shutdown(ctx); err != nil {
log.Printf("error shutting down web server: %s", err)
}
+
+ if err := instance.Close(); err != nil {
+ log.Printf("error closing instance: %s", err)
+ }
}