]> Cypherpunks repositories - gostls13.git/commit
net,internal/poll: load ws2_32.dll only when net is imported
authorqmuntal <quimmuntal@gmail.com>
Fri, 19 Jan 2024 15:27:22 +0000 (16:27 +0100)
committerQuim Muntal <quimmuntal@gmail.com>
Tue, 23 Jan 2024 18:57:32 +0000 (18:57 +0000)
commit9368ced7555d9320e93e83e18a67faa9af1226b9
tree3cbe7603c853da8e678ea9b30ef1adb1f80c7545
parent4085a4893c427a2138e28fe4f16a646e7f571adb
net,internal/poll: load ws2_32.dll only when net is imported

On Windows, ws2_32.dll is loaded and WSA initialized even if websockets
are not used.

This CL delays loading of ws2_32.dll and starting WSA until net is
initialized.

Change-Id: I07ea8241d79709cd4e80d29ba0d792c7444bbfe9
Reviewed-on: https://go-review.googlesource.com/c/go/+/557015
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/cmd/go/testdata/script/ws2_32.txt [new file with mode: 0644]
src/internal/poll/fd_windows.go
src/internal/poll/fd_windows_test.go
src/net/fd_windows.go