caddy -version
)?amd64 0.10.7 downloaded from GitHub release
I have two caddy servers (simulating my production setup):
When I SIGINT the backend caddy, the websocket connection still remain connected until I try to send something.
Frontend:
:2015
proxy / http://localhost:9999 {
websocket
transparent
}
log stdout
Backend:
:9999
websocket / "cat /dev/urandom"
log stdout
./caddy
. Tested on up-to-date Arch Linux as of this time of filing.
I tested by running wscat -c ws://localhost:2015
and ctrl+c the backend server. wscat version 1.0.1.
The connection should be terminated immediately when the backend server shutdown.
The connection get terminated only if I press enter (send a message) in wscat.
I believe the setup above is already simple to setup.
Thanks for filing this issue! Finally had a chance to look into this tonight, and your report checks out.
Thanks to @tw4452852 , this should be fixed now. If you can build from source, feel free to test it out!
Can confirm, the problem was fixed in master.