fix: 拦截错误
This commit is contained in:
1 parent
5825fd6f36
commit
7b09479cd2
1 file changed
+2
-1
@@ -30,9 +30,10 @@ export class WebsocketServerBase {
|
|||||||
start(port: number, host: string = '') {
|
start(port: number, host: string = '') {
|
||||||
try {
|
try {
|
||||||
this.ws = new WebSocketServer({
|
this.ws = new WebSocketServer({
|
||||||
port ,
|
port,
|
||||||
host: '',
|
host: '',
|
||||||
maxPayload: 1024 * 1024 * 1024
|
maxPayload: 1024 * 1024 * 1024
|
||||||
|
}).on('error', () => {
|
||||||
});
|
});
|
||||||
log(`ws服务启动成功, ${host}:${port}`);
|
log(`ws服务启动成功, ${host}:${port}`);
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
|
|||||||
Reference in new issue
Block a user