overlord: properly close WebSocket when client exit

Send a WebSocket close message before closing the raw socket to prevent
client being in inconsistent state.

TEST=onclose function should be called immediately after websocket is

Change-Id: I74c4ee4a06e3fe7261768d5c856803e685d3ef4b
Reviewed-on: https://chromium-review.googlesource.com/270234
Reviewed-by: Chih-Yu Huang <akahuang@chromium.org>
Commit-Queue: Wei-Ning Huang <wnhuang@chromium.org>
Tested-by: Wei-Ning Huang <wnhuang@chromium.org>
1 file changed