This repository was archived by the owner on Jun 22, 2025. It is now read-only.
Commit 9ea4024
committed
Shut down the eel server less aggressively
At the moment, every time a websocket connection closes, we check 1
second later to see if there any any connections open. If a user opens
and terminates multiple websocket connections, this can mean that one of
the earlier "1 second laters" comes along during a later
shutdown/reconnect and closes the server, despite the user navigating
through the app in a reasonable way.
This patch moves this check to a "spawn later" gevent greenlet that can
be terminated and rescheduled. Every time a websocket is closed, we
cancel any previously-running check and schedule a new one for 1 second
in the future, which should mean that Eel shuts down less often during
valid navigation step/s.
Fixes #2481 parent 0684eb5 commit 9ea4024
1 file changed
+13
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
326 | 328 | | |
327 | 329 | | |
328 | 330 | | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
329 | 336 | | |
| 337 | + | |
| 338 | + | |
330 | 339 | | |
331 | 340 | | |
332 | 341 | | |
333 | 342 | | |
334 | 343 | | |
335 | 344 | | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
340 | 349 | | |
341 | 350 | | |
342 | 351 | | |
| |||
0 commit comments