Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PoWeb server: WS socket is suddenly closed after sending first parcel #365

Open
gnarea opened this issue Jul 2, 2021 · 1 comment
Open
Assignees
Labels
bug Something isn't working

Comments

@gnarea
Copy link
Member

gnarea commented Jul 2, 2021

And the close event isn't fired, so we can't handle it.

Since we'd be trying to write to a closed stream, that crashes the app with:

Error: WebSocket is not open: readyState 3 (CLOSED)
    at sendAfterClose (/home/gus/repos/awala-gateway-desktop/packages/ui/app/node_modules/daemon/node_modules/ws/lib/websocket.js:763:17)
    at WebSocket.send (/home/gus/repos/awala-gateway-desktop/packages/ui/app/node_modules/daemon/node_modules/ws/lib/websocket.js:345:7)
    at Duplex.duplex._write (/home/gus/repos/awala-gateway-desktop/packages/ui/app/node_modules/daemon/node_modules/ws/lib/stream.js:169:8)
    at writeOrBuffer (internal/streams/writable.js:358:12)
    at Duplex.Writable.write (internal/streams/writable.js:303:10)
    at Object.sink (/home/gus/repos/awala-gateway-desktop/packages/ui/app/node_modules/daemon/node_modules/stream-to-it/sink.js:71:20)

I can reproduce this reliably by running the ping command twice (awala-ping ping).

@gnarea
Copy link
Member Author

gnarea commented Jul 16, 2021

This could have the same root cause as relaycorp/awala-gateway-internet#463

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant