mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-05-24 01:13:00 -04:00
Handle undefined Host and make chmod async
This commit is contained in:
parent
dc3c978f8d
commit
635c384952
@ -395,11 +395,11 @@ class Server {
|
||||
})
|
||||
router.get('/healthcheck', (req, res) => res.sendStatus(200))
|
||||
|
||||
const unixSocketPrefix = "unix/"
|
||||
if(this.Host.startsWith(unixSocketPrefix)) {
|
||||
const unixSocketPrefix = 'unix/'
|
||||
if (this.Host?.startsWith(unixSocketPrefix)) {
|
||||
const sockPath = this.Host.slice(unixSocketPrefix.length)
|
||||
this.server.listen(sockPath, () => {
|
||||
fs.chmodSync(sockPath, 0o666)
|
||||
this.server.listen(sockPath, async () => {
|
||||
await fs.chmod(sockPath, 0o666)
|
||||
Logger.info(`Listening on unix socket ${sockPath}`)
|
||||
})
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user