mirror of
https://github.com/foxcpp/maddy.git
synced 2025-04-07 06:57:37 +03:00
sql: Do not deadlock if no IMAP is configured to consume updates
This commit is contained in:
parent
c561492da7
commit
19e806d987
2 changed files with 11 additions and 1 deletions
6
sql.go
6
sql.go
|
@ -174,7 +174,11 @@ func (sqlm *SQLStorage) Init(cfg *config.Map) error {
|
|||
var fsstoreLocation string
|
||||
appendlimitVal := int64(-1)
|
||||
|
||||
opts := imapsql.Opts{}
|
||||
opts := imapsql.Opts{
|
||||
// Prevent deadlock if nobody is listening for updates (e.g. no IMAP
|
||||
// configured).
|
||||
LazyUpdatesInit: true,
|
||||
}
|
||||
cfg.String("driver", false, true, "", &driver)
|
||||
cfg.String("dsn", false, true, "", &dsn)
|
||||
cfg.Int64("appendlimit", false, false, 32*1024*1024, &appendlimitVal)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue