Merge pull request #1083 from hedgedoc/fix/unix_socket_cleanup
Properly clean up socket on exit
This commit is contained in:
commit
74f3780b22
8
app.js
8
app.js
@ -301,7 +301,13 @@ function handleTermSignals () {
|
|||||||
}, 0)
|
}, 0)
|
||||||
})
|
})
|
||||||
if (config.path) {
|
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 () {
|
const checkCleanTimer = setInterval(function () {
|
||||||
if (realtime.isReady()) {
|
if (realtime.isReady()) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user