Fix Peertube crash:
Peertube could crash when someone attemps to connect to Websocket endpoint during plugin initialization.
This commit is contained in:
parent
aa1170a3f4
commit
310419ad66
@ -11,6 +11,7 @@
|
||||
* Diagnostic tool: add the result of `prosodyctl check` in the debug section.
|
||||
* New debug mode
|
||||
* Fix room topic: due to a [bug in mod_muc_http_defaults](https://hg.prosody.im/prosody-modules/rev/6d99ddd99694), room topics were badly configured. The plugin will fix them at startup, and stops trying to set the subject.
|
||||
* Fix Peertube crash when someone attemps to connect to Websocket endpoint during plugin initialization.
|
||||
|
||||
## 6.2.3
|
||||
|
||||
|
@ -234,7 +234,10 @@ async function initWebchatRouter (options: RegisterServerOptionsV5): Promise<Rou
|
||||
route: '/xmpp-websocket',
|
||||
handler: (request, socket, head) => {
|
||||
if (!currentWebsocketProxy) {
|
||||
throw new Error('There is no current websocket proxy, should not get here.')
|
||||
peertubeHelpers.logger.error('There is no current websocket proxy, should not get here.')
|
||||
// no need to close the socket, Peertube will
|
||||
// (see https://github.com/Chocobozzz/PeerTube/issues/5752#issuecomment-1510870894)
|
||||
return
|
||||
}
|
||||
currentWebsocketProxy.ws(request, socket, head)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user