Commit 962c369
authored
fix: hold delegate reference to keep it from being deallocated (#26)
The problem we were having before was being caused by the system extension delegate being deallocated before the request responses came back.
I didn't initially realize this, but the [OSSystemRequest.delegate](https://developer.apple.com/documentation/systemextensions/ossystemextensionrequest/delegate) is a weak reference (you have to click down to the individual field view in the docs to learn this).
So, we keep a strong reference from the VPNService around while we are waiting for the extension to install.1 parent 2f7f8f8 commit 962c369
File tree
2 files changed
+11
-0
lines changed- Coder Desktop/Coder Desktop
2 files changed
+11
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
32 | 36 | | |
33 | 37 | | |
34 | 38 | | |
| |||
71 | 75 | | |
72 | 76 | | |
73 | 77 | | |
| 78 | + | |
74 | 79 | | |
75 | 80 | | |
76 | 81 | | |
| |||
87 | 92 | | |
88 | 93 | | |
89 | 94 | | |
| 95 | + | |
90 | 96 | | |
91 | 97 | | |
92 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
61 | 66 | | |
62 | 67 | | |
63 | 68 | | |
| |||
0 commit comments