mirror of
https://github.com/tinygo-org/net.git
synced 2026-08-16 10:43:29 +00:00
udpsock: remove TODO comment on ephemeral ports being racy
This commit is contained in:
committed by
deadprogram
parent
331151cafe
commit
ad745d61ae
@@ -126,7 +126,6 @@ type UDPConn struct {
|
|||||||
var eport = int32(49151)
|
var eport = int32(49151)
|
||||||
|
|
||||||
func ephemeralPort() int {
|
func ephemeralPort() int {
|
||||||
// TODO: this is racy, if concurrent DialUDPs; use atomic?
|
|
||||||
if eport == int32(65535) {
|
if eport == int32(65535) {
|
||||||
eport = int32(49151)
|
eport = int32(49151)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user