mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-26 02:05:31 +00:00
Keep the daemon running when a plugin session closes after its plugin process dies (#10585)
* fix(server): keep the daemon alive when a plugin session closes after its process dies PluginSessionSocket.close() sent paseo_close to the plugin child without a callback. Node does not throw when that send fails: it emits "error" on the ChildProcess, and the runtime has no error listener, so the failure became an uncaught exception. The try/catch around the send never ran. When a plugin process dies, a frame write to its session fails with EPIPE, the websocket server's outbound transport closes the socket, and the close's own send then crashed the daemon with "write EPIPE" (or ERR_IPC_CHANNEL_CLOSED once Node has seen the disconnect). Passing a callback makes the failed send a handled result. * test(server): skip the POSIX-only plugin EPIPE test on Windows
This commit is contained in:
@@ -340,6 +340,11 @@ jobs:
|
||||
src/server/plugins/index.posix.test.ts \
|
||||
-t "reaps compiler children" --bail=1
|
||||
|
||||
- name: Verify plugin session sockets survive a dead plugin child
|
||||
run: |
|
||||
npm run test:unit --workspace=@getpaseo/server -- \
|
||||
src/server/plugins/session-socket.posix.test.ts --bail=1
|
||||
|
||||
desktop-tests-ubuntu:
|
||||
name: desktop-tests (ubuntu-latest)
|
||||
needs: changes
|
||||
|
||||
Reference in New Issue
Block a user