Fix endless loop on shutdown when DB can't be reached
The shutdown handler calls `checkAllNotesRevision` on a 100 ms interval. If the database connection is broken, this will return an error. Previously, this error was effectively ignored and resulted in an endless loop printing out the error message every 100 ms. This improves the error handling by terminating the process with a nonzero exit code when an error was encountered 30 times. The loop interval is also increased to 200 ms, giving the database 6 seconds total time to recover in case of intermittent issues. Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
|
||||
### Bugfixes
|
||||
- Fix crash when trying to read the current Git commit on startup
|
||||
- Fix endless loop on shutdown when HedgeDoc can't connect to the database
|
||||
|
||||
## <i class="fa fa-tag"></i> 1.8.2 <i class="fa fa-calendar-o"></i> 2021-05-11
|
||||
|
||||
|
||||
Reference in New Issue
Block a user