send close frame when the client websocket closes. more cleanup