Mise à jour de GitLab prévue ce samedi 23 octobre 2021 à partir de 9h00 CET

Commit df535606 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[fix] #1141 Close websocket connection if authentication fails

parent b6ca9c1b
......@@ -5,7 +5,7 @@ import {GlobalFifoPromise} from "../../../service/GlobalFifoPromise"
import * as events from "events"
import {WS2PConstants} from "./constants"
import {WS2PMessageHandler} from "./impl/WS2PMessageHandler"
import { WS2PStreamer } from "./WS2PStreamer";
import {WS2PStreamer} from "./WS2PStreamer"
const WebSocketServer = require('ws').Server
......@@ -110,6 +110,7 @@ export class WS2PServer extends events.EventEmitter {
await this.server.dal.setPeerUP(c.pubkey)
} catch (e) {
ws.close()
this.server.logger.warn('WS2P: cannot connect to incoming WebSocket connection: %s', e)
}
})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment