[PR #499] [MERGED] fix: sharing context between api and goroutine caused goroutine to fail #620

Closed
opened 2026-02-25 23:34:55 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-shiori/shiori/pull/499
Author: @Acelya-9028
Created: 10/11/2022
Status: Merged
Merged: 10/11/2022
Merged by: @fmartingr

Base: masterHead: master


📝 Commits (1)

  • f12bfd0 fix: failed to save bookmark: context canceled

📊 Changes

1 file changed (+2 additions, -1 deletions)

View changed files

📝 internal/webserver/handler-api.go (+2 -1)

📄 Description

fix: failed to save bookmark: context canceled

When the HTTP request completes, the asynchronous bookmarks save may be incomplete. In this case, the shared context is canceled and saving bookmarks fails.

Introduced by github.com/go-shiori/shiori@09f2465065

fix: failed to save bookmark: ID must not be empty

SQLite and MySQL fail to save a bookmark because the database does not return the last inserted id.

This commit fix only SQLite so MySQL is still broken.

Introduced by github.com/go-shiori/shiori@222fc14fe2 and github.com/go-shiori/shiori@dc73cd825b


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-shiori/shiori/pull/499 **Author:** [@Acelya-9028](https://github.com/Acelya-9028) **Created:** 10/11/2022 **Status:** ✅ Merged **Merged:** 10/11/2022 **Merged by:** [@fmartingr](https://github.com/fmartingr) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`f12bfd0`](https://github.com/go-shiori/shiori/commit/f12bfd014932741a58b2b0eba9400a32aeb944e5) fix: failed to save bookmark: context canceled ### 📊 Changes **1 file changed** (+2 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `internal/webserver/handler-api.go` (+2 -1) </details> ### 📄 Description [fix: failed to save bookmark: context canceled](https://github.com/go-shiori/shiori/commit/f12bfd014932741a58b2b0eba9400a32aeb944e5) When the HTTP request completes, the asynchronous bookmarks save may be incomplete. In this case, the shared context is canceled and saving bookmarks fails. Introduced by https://github.com/go-shiori/shiori/commit/09f246506587afe60dfa61bda680ea0c4fa9d36b [fix: failed to save bookmark: ID must not be empty](https://github.com/go-shiori/shiori/commit/4c0092fb73966584cb5cc9740cb2e111c55fc878) SQLite and MySQL fail to save a bookmark because the database does not return the last inserted id. This commit fix only SQLite so MySQL is still broken. Introduced by https://github.com/go-shiori/shiori/commit/222fc14fe29f9988db9aca2972c2f3a29c3914b0 and https://github.com/go-shiori/shiori/commit/dc73cd825b9d8b997364062b625bb4b3f15bc1c8 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-25 23:34:55 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shiori#620
No description provided.