Commit e738efe
refactor(@embark/blockchain_process): swallow errors, revise streams
For reasons unknown, `ECONNRESET` errors on websocket connections to embark's
blockchain proxy are not automatically handled on Windows as they are on macOS
and Linux (or those errors aren't happening on those platforms, it's difficult
to determine). Explicitly swallow such errors so the blockchain process doesn't
crash. Prior to this PR, the crash-behavior can be reproduced on Windows by
running `embark blockchain` and `embark run` in separate terminals and quitting
`embark run` while `embark blockchain` is still running.
Consistently use the `simples` package's `WsParser` to process websocket
traffic instead of using `WsParser` for requests and the `ws` package's
`Websocket.Receiver` for responses.
Consistently use `pump` to connect parser streams instead of using `pump` in
some places and `chain` in others. Drop use of `cloneable` (and the package
dependency) since it was used previously in hopes it would fix the errors, but
it's unnecessary and didn't fix them.1 parent 7d2ceaa commit e738efe
File tree
3 files changed
+21
-42
lines changed- src/lib/modules/blockchain_process
3 files changed
+21
-42
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
95 | 94 | | |
96 | 95 | | |
97 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | 5 | | |
8 | 6 | | |
9 | | - | |
| 7 | + | |
10 | 8 | | |
11 | 9 | | |
12 | 10 | | |
13 | | - | |
14 | 11 | | |
15 | 12 | | |
16 | 13 | | |
| |||
21 | 18 | | |
22 | 19 | | |
23 | 20 | | |
| 21 | + | |
24 | 22 | | |
25 | 23 | | |
26 | 24 | | |
27 | 25 | | |
| 26 | + | |
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
33 | | - | |
34 | | - | |
35 | 32 | | |
36 | 33 | | |
37 | 34 | | |
| |||
137 | 134 | | |
138 | 135 | | |
139 | 136 | | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
144 | 140 | | |
145 | 141 | | |
146 | 142 | | |
| |||
149 | 145 | | |
150 | 146 | | |
151 | 147 | | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
156 | 151 | | |
157 | 152 | | |
158 | 153 | | |
| |||
162 | 157 | | |
163 | 158 | | |
164 | 159 | | |
165 | | - | |
166 | | - | |
| 160 | + | |
167 | 161 | | |
168 | 162 | | |
169 | 163 | | |
170 | | - | |
171 | 164 | | |
172 | 165 | | |
173 | 166 | | |
174 | 167 | | |
175 | | - | |
176 | | - | |
177 | | - | |
| 168 | + | |
| 169 | + | |
178 | 170 | | |
179 | 171 | | |
180 | | - | |
181 | 172 | | |
182 | 173 | | |
183 | 174 | | |
| |||
192 | 183 | | |
193 | 184 | | |
194 | 185 | | |
195 | | - | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
196 | 193 | | |
197 | 194 | | |
198 | 195 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2333 | 2333 | | |
2334 | 2334 | | |
2335 | 2335 | | |
2336 | | - | |
2337 | | - | |
2338 | | - | |
2339 | | - | |
2340 | | - | |
2341 | | - | |
2342 | | - | |
2343 | | - | |
2344 | 2336 | | |
2345 | 2337 | | |
2346 | 2338 | | |
| |||
8175 | 8167 | | |
8176 | 8168 | | |
8177 | 8169 | | |
8178 | | - | |
8179 | | - | |
8180 | | - | |
8181 | | - | |
8182 | | - | |
8183 | | - | |
8184 | | - | |
8185 | | - | |
8186 | | - | |
8187 | 8170 | | |
8188 | 8171 | | |
8189 | 8172 | | |
| |||
9389 | 9372 | | |
9390 | 9373 | | |
9391 | 9374 | | |
9392 | | - | |
| 9375 | + | |
9393 | 9376 | | |
9394 | 9377 | | |
9395 | 9378 | | |
| |||
10142 | 10125 | | |
10143 | 10126 | | |
10144 | 10127 | | |
10145 | | - | |
| 10128 | + | |
10146 | 10129 | | |
10147 | 10130 | | |
10148 | 10131 | | |
| |||
0 commit comments