- Notifications
You must be signed in to change notification settings - Fork914
Commit780b271
Cherry-picked fix(vpn): fail early if wintun.dll is not present (#16707)Prevents the VPN startup from hanging for 5 minutes due to a startupbackoff if `wintun.dll` cannot be loaded.Because the `wintun` package doesn't expose an easy `Load() error`method for us, the only way for us to force it to load (without unwantedside effects) is through `wintun.Version()` which doesn't return anerror message.So, we call that function so the `wintun` package loads the DLL andconfigures the logging properly, then we try to load the DLL ourselves.`LoadLibraryEx` will not load the library multiple times and returns areference to the existing library.Closescoder/coder-desktop-windows#24Co-authored-by: Dean Sheather <dean@deansheather.com>
1 parent34740bc commit780b271
1 file changed
+31
-3
lines changedLines changed: 31 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
25 | 25 |
| |
26 | 26 |
| |
27 | 27 |
| |
28 |
| - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
29 | 34 |
| |
30 | 35 |
| |
31 | 36 |
| |
| |||
44 | 49 |
| |
45 | 50 |
| |
46 | 51 |
| |
47 |
| - | |
| 52 | + | |
48 | 53 |
| |
49 |
| - | |
| 54 | + | |
50 | 55 |
| |
51 | 56 |
| |
52 | 57 |
| |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
53 | 81 |
| |
54 | 82 |
| |
55 | 83 |
| |
|
0 commit comments
Comments
(0)