Handle responses other than ok by closing the connection.
Throw away the response.

Is there any specific behavior required if close frame
fails to be sent to the server?