@@ -3,6 +3,7 @@ constants = import_module("../package_io/constants.star")
33TCP_PROTOCOL = "TCP"
44UDP_PROTOCOL = "UDP"
55HTTP_APPLICATION_PROTOCOL = "http"
6+ WS_APPLICATION_PROTOCOL = "ws"
67NOT_PROVIDED_APPLICATION_PROTOCOL = ""
78NOT_PROVIDED_WAIT = "not-provided-wait"
89
@@ -287,10 +288,20 @@ def get_port_specs(port_assignments):
287288 constants .PROFILING_PORT_ID ,
288289 ]:
289290 ports .update ({port_id : new_port_spec (port , TCP_PROTOCOL )})
290- elif port_id == constants .UDP_DISCOVERY_PORT_ID :
291- ports .update ({port_id : new_port_spec (port , UDP_PROTOCOL )})
292- elif port_id == constants .QUIC_DISCOVERY_PORT_ID :
291+ elif port_id in [
292+ constants .UDP_DISCOVERY_PORT_ID ,
293+ constants .QUIC_DISCOVERY_PORT_ID ,
294+ constants .TORRENT_PORT_ID ,
295+ ]:
293296 ports .update ({port_id : new_port_spec (port , UDP_PROTOCOL )})
297+ elif port_id == constants .DEBUG_PORT_ID :
298+ ports .update (
299+ {
300+ port_id : new_port_spec (
301+ port , TCP_PROTOCOL , WS_APPLICATION_PROTOCOL , wait = None
302+ )
303+ }
304+ )
294305 elif port_id in [
295306 constants .HTTP_PORT_ID ,
296307 constants .METRICS_PORT_ID ,
@@ -303,6 +314,8 @@ def get_port_specs(port_assignments):
303314 ports .update (
304315 {port_id : new_port_spec (port , TCP_PROTOCOL , HTTP_APPLICATION_PROTOCOL )}
305316 )
317+ else :
318+ fail ("Unknown port id: {}" .format (port_id ))
306319 return ports
307320
308321
0 commit comments