segmentation fault if binding ports fails in hopping mode

if the server is started and hits ports that are already occupied, it panics in a subsequent step

⇨ http server started on [::]:9090
2024/11/05 12:25:34 Error calling ReadInConfig: Config File "obfsvpn" Not Found in "[/opt/obfsvpn]"
2024/11/05 12:25:34 Using obfs4 config file: /opt/obfsvpn/statedir/obfs4_state.json
DEBUG 2024/11/05 12:25:34 kcp: false, hop: true, udp: false, quic: true
DEBUG 2024/11/05 12:25:34 DEBUG: &{{<nil> 0s 0} {false 65535 65535 16777216 16777216 true 10 2 true 1400} {true 0xc0000ca780} 0xc000112000 0xc00010e000  [18 113 105 109 94 44 239 67 17 57 195 134 243 187 122 71 24 148 255 239 197 133 48 215 0 0 0 0 0 0 0 0] /opt/obfsvpn/statedir}
2024/11/05 12:25:34 quic listen on 0.0.0.0:26981
2024/11/05 12:25:34 quic listen on 0.0.0.0:26937
2024/11/05 12:25:34 quic listen on 0.0.0.0:26897
2024/11/05 12:25:34 quic listen on 0.0.0.0:26909
2024/11/05 12:25:34 quic listen on 0.0.0.0:26881
2024/11/05 12:25:34 quic listen on 0.0.0.0:26868
2024/11/05 12:25:34 quic listen on 0.0.0.0:26875
2024/11/05 12:25:34 quic listen on 0.0.0.0:26990
2024/11/05 12:25:34 quic listen on 0.0.0.0:26956
2024/11/05 12:25:34 quic listen on 0.0.0.0:26850
2024/11/05 12:25:34 quic listen on 0.0.0.0:26894
2024/11/05 12:25:34 quic listen on 0.0.0.0:26911
2024/11/05 12:25:34 quic listen on 0.0.0.0:26862
2024/11/05 12:25:34 quic listen on 0.0.0.0:26939
2024/11/05 12:25:34 quic listen on 0.0.0.0:26878
2024/11/05 12:25:34 quic listen on 0.0.0.0:26924
2024/11/05 12:25:34 quic listen on 0.0.0.0:26961
2024/11/05 12:25:34 quic listen on 0.0.0.0:26945
2024/11/05 12:25:34 quic listen on 0.0.0.0:26987
2024/11/05 12:25:34 quic listen on 0.0.0.0:26906
2024/11/05 12:25:34 quic listen on 0.0.0.0:26945
2024/11/05 12:25:34 Error binding to 0.0.0.0:26945: listen udp 0.0.0.0:26945: bind: address already in use
2024/11/05 12:25:34 quic listen on 0.0.0.0:26916
2024/11/05 12:25:34 quic listen on 0.0.0.0:26978
2024/11/05 12:25:34 quic listen on 0.0.0.0:26908
2024/11/05 12:25:34 quic listen on 0.0.0.0:26997
2024/11/05 12:25:34 quic listen on 0.0.0.0:26947
2024/11/05 12:25:34 quic listen on 0.0.0.0:26887
2024/11/05 12:25:34 quic listen on 0.0.0.0:26938
2024/11/05 12:25:34 quic listen on 0.0.0.0:26940
2024/11/05 12:25:34 quic listen on 0.0.0.0:26865
2024/11/05 12:25:34 quic listen on 0.0.0.0:26941
2024/11/05 12:25:34 quic listen on 0.0.0.0:26958
2024/11/05 12:25:34 quic listen on 0.0.0.0:26987
2024/11/05 12:25:34 Error binding to 0.0.0.0:26987: listen udp 0.0.0.0:26987: bind: address already in use
2024/11/05 12:25:34 quic listen on 0.0.0.0:26981
2024/11/05 12:25:34 Error binding to 0.0.0.0:26981: listen udp 0.0.0.0:26981: bind: address already in use
2024/11/05 12:25:34 quic listen on 0.0.0.0:26979
2024/11/05 12:25:34 quic listen on 0.0.0.0:26906
2024/11/05 12:25:34 Error binding to 0.0.0.0:26906: listen udp 0.0.0.0:26906: bind: address already in use
2024/11/05 12:25:34 quic listen on 0.0.0.0:26937
2024/11/05 12:25:34 Error binding to 0.0.0.0:26937: listen udp 0.0.0.0:26937: bind: address already in use
2024/11/05 12:25:34 quic listen on 0.0.0.0:26881
2024/11/05 12:25:34 Error binding to 0.0.0.0:26881: listen udp 0.0.0.0:26881: bind: address already in use
2024/11/05 12:25:34 quic listen on 0.0.0.0:26985
2024/11/05 12:25:34 quic listen on 0.0.0.0:26976
2024/11/05 12:25:34 quic listen on 0.0.0.0:26863
2024/11/05 12:25:34 quic listen on 0.0.0.0:26890
2024/11/05 12:25:34 quic listen on 0.0.0.0:26944
2024/11/05 12:25:34 quic listen on 0.0.0.0:26913
2024/11/05 12:25:34 quic listen on 0.0.0.0:26983
2024/11/05 12:25:34 quic listen on 0.0.0.0:26997
2024/11/05 12:25:34 Error binding to 0.0.0.0:26997: listen udp 0.0.0.0:26997: bind: address already in use
2024/11/05 12:25:34 quic listen on 0.0.0.0:26878
2024/11/05 12:25:34 Error binding to 0.0.0.0:26878: listen udp 0.0.0.0:26878: bind: address already in use
2024/11/05 12:25:34 quic listen on 0.0.0.0:26974
2024/11/05 12:25:34 quic listen on 0.0.0.0:26959
2024/11/05 12:25:34 quic listen on 0.0.0.0:26853
2024/11/05 12:25:34 quic listen on 0.0.0.0:26907
2024/11/05 12:25:34 quic listen on 0.0.0.0:26971
2024/11/05 12:25:34 quic listen on 0.0.0.0:26889
2024/11/05 12:25:34 quic listen on 0.0.0.0:26949
2024/11/05 12:25:34 quic listen on 0.0.0.0:26950
2024/11/05 12:25:34 quic listen on 0.0.0.0:26905
2024/11/05 12:25:34 quic listen on 0.0.0.0:26888
2024/11/05 12:25:34 quic listen on 0.0.0.0:26988
2024/11/05 12:25:34 quic listen on 0.0.0.0:26953
2024/11/05 12:25:34 quic listen on 0.0.0.0:26855
2024/11/05 12:25:34 quic listen on 0.0.0.0:26951
2024/11/05 12:25:34 quic listen on 0.0.0.0:26910
2024/11/05 12:25:34 quic listen on 0.0.0.0:26955
2024/11/05 12:25:34 quic listen on 0.0.0.0:26856
2024/11/05 12:25:34 quic listen on 0.0.0.0:26866
2024/11/05 12:25:34 quic listen on 0.0.0.0:26978
2024/11/05 12:25:34 Error binding to 0.0.0.0:26978: listen udp 0.0.0.0:26978: bind: address already in use
2024/11/05 12:25:34 quic listen on 0.0.0.0:26861
2024/11/05 12:25:34 quic listen on 0.0.0.0:26852
2024/11/05 12:25:34 quic listen on 0.0.0.0:26933
2024/11/05 12:25:34 quic listen on 0.0.0.0:26996
2024/11/05 12:25:34 quic listen on 0.0.0.0:26863
2024/11/05 12:25:34 Error binding to 0.0.0.0:26863: listen udp 0.0.0.0:26863: bind: address already in use
2024/11/05 12:25:34 quic listen on 0.0.0.0:26976
2024/11/05 12:25:34 Error binding to 0.0.0.0:26976: listen udp 0.0.0.0:26976: bind: address already in use
2024/11/05 12:25:34 quic listen on 0.0.0.0:26852
2024/11/05 12:25:34 Error binding to 0.0.0.0:26852: listen udp 0.0.0.0:26852: bind: address already in use
2024/11/05 12:25:34 quic listen on 0.0.0.0:26918
2024/11/05 12:25:34 quic listen on 0.0.0.0:26997
2024/11/05 12:25:34 Error binding to 0.0.0.0:26997: listen udp 0.0.0.0:26997: bind: address already in use
2024/11/05 12:25:34 quic listen on 0.0.0.0:26994
2024/11/05 12:25:34 quic listen on 0.0.0.0:26977
2024/11/05 12:25:34 quic listen on 0.0.0.0:26863
2024/11/05 12:25:34 Error binding to 0.0.0.0:26863: listen udp 0.0.0.0:26863: bind: address already in use
2024/11/05 12:25:34 quic listen on 0.0.0.0:26896
2024/11/05 12:25:34 quic listen on 0.0.0.0:26870
2024/11/05 12:25:34 quic listen on 0.0.0.0:26973
2024/11/05 12:25:34 quic listen on 0.0.0.0:26853
2024/11/05 12:25:34 Error binding to 0.0.0.0:26853: listen udp 0.0.0.0:26853: bind: address already in use
2024/11/05 12:25:34 quic listen on 0.0.0.0:26887
2024/11/05 12:25:34 Error binding to 0.0.0.0:26887: listen udp 0.0.0.0:26887: bind: address already in use
2024/11/05 12:25:34 quic listen on 0.0.0.0:26983
2024/11/05 12:25:34 Error binding to 0.0.0.0:26983: listen udp 0.0.0.0:26983: bind: address already in use
2024/11/05 12:25:34 quic listen on 0.0.0.0:26891
2024/11/05 12:25:34 quic listen on 0.0.0.0:26959
2024/11/05 12:25:34 Error binding to 0.0.0.0:26959: listen udp 0.0.0.0:26959: bind: address already in use
2024/11/05 12:25:34 quic listen on 0.0.0.0:26933
2024/11/05 12:25:34 Error binding to 0.0.0.0:26933: listen udp 0.0.0.0:26933: bind: address already in use
2024/11/05 12:25:34 quic listen on 0.0.0.0:26993
2024/11/05 12:25:34 quic listen on 0.0.0.0:26891
2024/11/05 12:25:34 Error binding to 0.0.0.0:26891: listen udp 0.0.0.0:26891: bind: address already in use
2024/11/05 12:25:34 quic listen on 0.0.0.0:26902
2024/11/05 12:25:34 quic listen on 0.0.0.0:26978
2024/11/05 12:25:34 Error binding to 0.0.0.0:26978: listen udp 0.0.0.0:26978: bind: address already in use
2024/11/05 12:25:34 quic listen on 0.0.0.0:26986
2024/11/05 12:25:34 quic listen on 0.0.0.0:26946
2024/11/05 12:25:34 quic listen on 0.0.0.0:26857
2024/11/05 12:25:34 quic listen on 0.0.0.0:26940
2024/11/05 12:25:34 Error binding to 0.0.0.0:26940: listen udp 0.0.0.0:26940: bind: address already in use
2024/11/05 12:25:34 quic listen on 0.0.0.0:26953
2024/11/05 12:25:34 Error binding to 0.0.0.0:26953: listen udp 0.0.0.0:26953: bind: address already in use
2024/11/05 12:25:34 quic listen on 0.0.0.0:26952
2024/11/05 12:25:34 quic listen on 0.0.0.0:26943
2024/11/05 12:25:34 quic listen on 0.0.0.0:26905
2024/11/05 12:25:34 Error binding to 0.0.0.0:26905: listen udp 0.0.0.0:26905: bind: address already in use
2024/11/05 12:25:34 quic listen on 0.0.0.0:26948
2024/11/05 12:25:34 Listening on [::]:26948…
2024/11/05 12:25:34 Listening on [::]:26959…
2024/11/05 12:25:34 Listening on [::]:26974…
2024/11/05 12:25:34 Listening on [::]:26981…
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x7603ce]

goroutine 345 [running]:
0xacab.org/leap/obfsvpn/obfsvpn.(*Listener).Addr(0x0?)
	/go/src/0xacab.org/leap/obfsvpn/obfsvpn/listener.go:222 +0xe
0xacab.org/leap/obfsvpn/server.(*UDPServer).acceptLoop(0xc00010c000, {0x9604d8, 0x0})
	/go/src/0xacab.org/leap/obfsvpn/server/udpserver.go:102 +0x3e
created by 
0xacab.org/leap/obfsvpn/server.(*UDPServer).Start in goroutine 1
	/go/src/0xacab.org/leap/obfsvpn/server/udpserver.go:79 +0x5bb
Server exited. Killing background process.