mirror of
				https://github.com/advplyr/audiobookshelf.git
				synced 2025-10-30 18:12:25 -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)) |     router.get('/healthcheck', (req, res) => res.sendStatus(200)) | ||||||
| 
 | 
 | ||||||
|     const unixSocketPrefix = "unix/" |     const unixSocketPrefix = 'unix/' | ||||||
|     if(this.Host.startsWith(unixSocketPrefix)) { |     if (this.Host?.startsWith(unixSocketPrefix)) { | ||||||
|       const sockPath = this.Host.slice(unixSocketPrefix.length) |       const sockPath = this.Host.slice(unixSocketPrefix.length) | ||||||
|       this.server.listen(sockPath, () => { |       this.server.listen(sockPath, async () => { | ||||||
|         fs.chmodSync(sockPath, 0o666) |         await fs.chmod(sockPath, 0o666) | ||||||
|         Logger.info(`Listening on unix socket ${sockPath}`) |         Logger.info(`Listening on unix socket ${sockPath}`) | ||||||
|       }) |       }) | ||||||
|     } else { |     } else { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user