properly close the websocket connection

Signed-off-by: John Tuley <jtuley@pivotallabs.com>