mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-05-31 02:29:18 +02:00
Fix panic in manager when attachment-cache-dir
is not set, fixes #617
This commit is contained in:
parent
7fb6f794e5
commit
38e7801b41
5 changed files with 68 additions and 30 deletions
server
|
@ -536,7 +536,7 @@ func (c *messageCache) ExpireMessages(topics ...string) error {
|
|||
}
|
||||
defer tx.Rollback()
|
||||
for _, t := range topics {
|
||||
if _, err := tx.Exec(updateMessagesForTopicExpiryQuery, time.Now().Unix(), t); err != nil {
|
||||
if _, err := tx.Exec(updateMessagesForTopicExpiryQuery, time.Now().Unix()-1, t); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue