mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-29 06:15:29 -04:00
Merge pull request #1083 from hedgedoc/fix/unix_socket_cleanup
Properly clean up socket on exit
This commit is contained in:
commit
74f3780b22
1 changed files with 7 additions and 1 deletions
8
app.js
8
app.js
|
@ -301,7 +301,13 @@ function handleTermSignals () {
|
|||
}, 0)
|
||||
})
|
||||
if (config.path) {
|
||||
fs.unlink(config.path)
|
||||
fs.unlink(config.path, err => {
|
||||
if (err) {
|
||||
logger.error(`Could not cleanup socket: ${err.message}`)
|
||||
} else {
|
||||
logger.info('Successfully cleaned up socket')
|
||||
}
|
||||
})
|
||||
}
|
||||
const checkCleanTimer = setInterval(function () {
|
||||
if (realtime.isReady()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue