You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(@probitas/probitas): prevent BadResource error in subprocess HTTP/2 cleanup
Subprocess execution with HTTP/2 clients was causing "BadResource: Bad
resource ID" errors from node:http2 due to premature IPC connection closure
during active HTTP/2 stream finalization.
The issue occurred because:
1. IpcConnection.close() did not await writer.close(), abandoning pending writes
2. Parent process closed IPC before subprocess completed cleanup
3. Subprocess exited immediately without giving HTTP/2 sessions time to finalize
Fixed by:
- Making IpcConnection.close() async and awaiting writer.close()
- Awaiting closeIpc() calls in subprocess templates
- Reordering parent cleanup to wait for subprocess exit before closing IPC
- Adding 100ms grace period before subprocess exit for resource cleanup
This ensures HTTP/2 sessions can properly close their streams before the
underlying TCP connection is terminated.
0 commit comments