it's possible the socket may be closed when we try to write the upgrade response in _accept_connection, suppress the error and close the connection