mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-05-09 16:35:53 +02:00
[PR #1397] [MERGED] Add a lock to add_messages #1592
Labels
No labels
ai-generated
android-app
android-app
android-app
🪲 bug
build
build
dependencies
docs
enhancement
enhancement
🔥 HOT
in-progress 🏃
ios
prio:low
prio:low
pull-request
question
🔒 security
server
server
unified-push
web-app
website
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ntfy#1592
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/binwiederhier/ntfy/pull/1397
Author: @timofej673
Created: 7/22/2025
Status: ✅ Merged
Merged: 8/8/2025
Merged by: @binwiederhier
Base:
main← Head:main📝 Commits (4)
006f73aUpdate message_cache.go214f70eMerge branch 'binwiederhier:main' into maind9ecee7Merge branch 'binwiederhier:main' into mainf8082d9Update message_cache.go📊 Changes
1 file changed (+22 additions, -8 deletions)
View changed files
📝
server/message_cache.go(+22 -8)📄 Description
Fixes #1391
According to the rules of sqlite - there can only be one writer
So my change adds a lock via a mutex to add_messages to comply with this rule and not cause error "database is locked". I tested my version - everything works for me and this error disappeared
Also I formatted the code a little so that there are no extra tabs and spaces and something like that
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.