File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @bpinternal/tunnel" ,
3- "version" : " 0.1.24 " ,
3+ "version" : " 0.1.25 " ,
44 "description" : " Tunneling logic for client and server" ,
55 "main" : " ./dist/index.cjs" ,
66 "browser" : " ./dist/index.mjs" ,
Original file line number Diff line number Diff line change @@ -90,10 +90,17 @@ export class TunnelServer {
9090 ws . close ( code , reason )
9191 return
9292 }
93+
9394 const { tunnelId } = parseResult
95+ if ( this . _tunnels [ tunnelId ] ) {
96+ ws . close ( errors . CLOSE_CODES . TUNNEL_ID_CONFLICT , 'tunnel ID already in use' )
97+ return
98+ }
99+
94100 const tunnel = new TunnelHead ( tunnelId , ws )
95101 tunnel . events . once ( 'close' , ( ) => this . _handleDisconnection ( tunnelId ) )
96102 this . events . emit ( 'connection' , tunnel )
103+
97104 this . _tunnels [ tunnelId ] = tunnel
98105 }
99106
You can’t perform that action at this time.
0 commit comments