`Failure("hd")` and `Failure("cannot write to closed writer")` when websocket connections closes
- Lingua principale
- OCaml
- Stelle
- 217
- Fork
- 26
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
To reproduce:
```
% dune exec examples/eio/echo_server_upgrade.exe
```
```js
// run with `node file.js`
const ws = new WebSocket("ws://localhost:8080/");
ws.onopen = function()
{
console.log("open");
setTimeout(() => {
console.log("close");
ws.close();
}, 1000);
};
```
The server outputs (with an ugly backtrace with `Printexc.record_backtrace true`):
```
echo_server_upgrade.exe: [INFO] Server listening on tcp:127.0.0.1:12345
echo_server_upgrade.exe: [ERROR] Error in connection handler: Multiple exceptions:
- Failure("hd")
- Failure("cannot write to closed writer")
```
It would be nice to handle a regular connection closing more gracefully.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.