File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -497,16 +497,14 @@ function startserver() {
497497
498498function startWebSocketServer ( ) {
499499 try {
500- wsServer = new WebSocket . Server ( { port : 54322 } ) ;
501- tomsg ( 'WebSocket server started on port 54322' ) ;
500+ wsServer = new WebSocket . Server ( { port : 54322 , exclusive : true } ) ;
502501
503502 wsServer . on ( 'connection' , ( ws ) => {
504503 wsClients . add ( ws ) ;
505- tomsg ( 'WebSocket client connected' ) ;
504+ console . log ( 'WebSocket client connected' ) ;
506505
507506 ws . on ( 'close' , ( ) => {
508507 wsClients . delete ( ws ) ;
509- tomsg ( 'WebSocket client disconnected' ) ;
510508 } ) ;
511509
512510 ws . on ( 'error' , ( error ) => {
@@ -527,7 +525,7 @@ function startWebSocketServer() {
527525 } ) ;
528526
529527 } catch ( e ) {
530- tomsg ( 'Failed to start WebSocket server on port 54322: ' + e . message ) ;
528+ console . error ( ' WebSocket server startup error:' , e ) ;
531529 }
532530}
533531
You can’t perform that action at this time.
0 commit comments