Closing an SSL websocket bombs out. SSL sockets can only be closed in both directions at once, but websockets send a FRAME_CLOSE and then close in the write direction only.
Is it necessary to close in the write direction only, or can the websocket simply close both ends at once?
The exception can't easily be dealt with, since it happens in the backend.
Demo code available here. If you don't have a certificate, it'll generate a self-signed; the behaviour is the same.
https://github.com/Rosuav/StilleBot/blob/master/ws_halfclose.pike
ChrisA