where we pass the RequestHandlerClass=websocketproxy.NovaProxyRequestHandler to websockify.WebSocketProxy. Then, in websockify.WebsockifyServer.do_handshake, it will create an instance of the RequestHandlerClass:
which is our websocketproxy.NovaProxyRequestHandler. The arguments to the class are the socket object and the address. Is there some way we can tell from the socket object that the message is a TCP RST? If so, maybe we could avoid creating a new ComputeAPI object in that case.
Otherwise, I'm not sure how we could do anything about this in nova vs websockify.
AFAICT, this is behavior in websockify and I'm not yet sure whether we can avoid it.
This is our code for creating the websockify. WebSocketProxy:
https:/ /github. com/openstack/ nova/blob/ be8af28a4ff111f 99da9b34ee36a90 a8a25d5bef/ nova/cmd/ baseproxy. py#L68- L80
where we pass the RequestHandlerC lass=websocketp roxy.NovaProxyR equestHandler to websockify. WebSocketProxy. Then, in websockify. WebsockifyServe r.do_handshake, it will create an instance of the RequestHandlerC lass:
https:/ /github. com/novnc/ websockify/ blob/6e09ec2548 6f431e2acc463f9 94c4eb4bebc6ddd /websockify/ websockifyserve r.py#L538- L622
which is our websocketproxy. NovaProxyReques tHandler. The arguments to the class are the socket object and the address. Is there some way we can tell from the socket object that the message is a TCP RST? If so, maybe we could avoid creating a new ComputeAPI object in that case.
Otherwise, I'm not sure how we could do anything about this in nova vs websockify.