Commit 6279b37
authored
Check if global state is already initialized before creating listeners (#562)
We were originally assuming that the global state was always going to be present when a listener is created.
Due to the concurrent nature of the LSP, this is not always true. If the Rails + Tapioca add-on combination takes a while to finish booting, it's expected that the LSP may switch threads and a request will get executed before activating add-ons is complete.
I started returning early if the global state is not yet available.1 parent a1f3cc1 commit 6279b37
1 file changed
+9
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
85 | 87 | | |
86 | 88 | | |
87 | 89 | | |
| |||
92 | 94 | | |
93 | 95 | | |
94 | 96 | | |
95 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
96 | 100 | | |
97 | 101 | | |
98 | 102 | | |
| |||
116 | 120 | | |
117 | 121 | | |
118 | 122 | | |
119 | | - | |
120 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
121 | 126 | | |
122 | 127 | | |
123 | 128 | | |
| |||
0 commit comments