From c2b823826db167594f8157b0b324b6fb1559caeb Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 11 Jan 2021 09:33:14 +0100 Subject: [PATCH] Log RTMP server error (address already in use) --- server.ts | 2 +- server/lib/live-manager.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/server.ts b/server.ts index edfbab3d7..e674a09d4 100644 --- a/server.ts +++ b/server.ts @@ -283,7 +283,7 @@ async function startApplication () { // Make server listening server.listen(port, hostname, () => { - logger.info('Server listening on %s:%d', hostname, port) + logger.info('HTTP server listening on %s:%d', hostname, port) logger.info('Web server: %s', WEBSERVER.URL) Hooks.runAction('action:application.listening') diff --git a/server/lib/live-manager.ts b/server/lib/live-manager.ts index 379f61bdf..7f5fdf899 100644 --- a/server/lib/live-manager.ts +++ b/server/lib/live-manager.ts @@ -109,6 +109,10 @@ class LiveManager { logger.info('Running RTMP server on port %d', config.rtmp.port) this.rtmpServer = new NodeRtmpServer(config) + this.rtmpServer.tcpServer.on('error', err => { + logger.error('Cannot run RTMP server.', { err }) + }) + this.rtmpServer.run() }