Commit fb41a22
fix: propagate server errors instead of leaking continuation
The withCheckedContinuation that never resumed caused two problems:
1. SWIFT TASK CONTINUATION MISUSE runtime warnings
2. If Hummingbird crashed in the background Task, the error was silently
swallowed — the process stayed alive but stopped accepting connections,
causing silent disconnects from MCP Router with no auto-recovery.
Now main.swift awaits transport.waitForTermination() which propagates
errors from the server Task. If the server dies, the process exits and
launchd restarts it, allowing MCP Router to reconnect.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 3a9a06c commit fb41a22
File tree
2 files changed
+11
-3
lines changed- swift/Sources/iMessageMax
- Server
2 files changed
+11
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
131 | 141 | | |
132 | 142 | | |
133 | 143 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | | - | |
61 | | - | |
| 59 | + | |
62 | 60 | | |
63 | 61 | | |
64 | 62 | | |
| |||
0 commit comments