fix zombie leak, add quiet-hours toggle, improve query reply, configurable router threshold, JS dashboard
This commit is contained in:
@@ -70,7 +70,9 @@ func Open(ctx context.Context, path string) (*Store, error) {
|
||||
// single writer expected; the daemon is the only process touching the db.
|
||||
db.SetMaxOpenConns(1)
|
||||
if _, err := db.ExecContext(ctx, schemaSQL); err != nil {
|
||||
_ = db.Close()
|
||||
if closeErr := db.Close(); closeErr != nil {
|
||||
return nil, fmt.Errorf("apply schema: %w (close: %v)", err, closeErr)
|
||||
}
|
||||
return nil, fmt.Errorf("apply schema: %w", err)
|
||||
}
|
||||
return &Store{db: db}, nil
|
||||
|
||||
Reference in New Issue
Block a user