Commit e3471cb
Immediately close a WebSocket connection to a runner
The previous code mostly worked but there could be cases where stopping was delayed. This is especially problematic with the reservation of runners, since they could still be reserved (internally) without a visual indicator for the learners.
The change in the SubmissionsController is optional, since a browser should also close the connection once `close_client_connection` is executed. However, this change might stop the runner earlier, which is especially useful in case of infinite loops.1 parent 57a8058 commit e3471cb
File tree
2 files changed
+7
-1
lines changed- app/controllers
- lib/runner
2 files changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| 143 | + | |
143 | 144 | | |
144 | 145 | | |
145 | 146 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
88 | 93 | | |
89 | 94 | | |
90 | 95 | | |
| |||
0 commit comments