Force reopening eventlet's hub after fork
With this we reopen eventlet's hub after a fork (triggered from websockify when a new client connects) to prevent sharing epoll's fd with the parent, which may cause erratic behaviour. This caused novncproxy to stop working when it had more than two clients connected. Fixes bug #1193031 Change-Id: I3ff9001543b84b1037597da243422490bb611657
This commit is contained in:
parent
91220ec94d
commit
cb25bc4530
|
@ -42,6 +42,11 @@ class NovaWebSocketProxy(websockify.WebSocketProxy):
|
||||||
"""
|
"""
|
||||||
Called after a new WebSocket connection has been established.
|
Called after a new WebSocket connection has been established.
|
||||||
"""
|
"""
|
||||||
|
# Reopen the eventlet hub to make sure we don't share an epoll
|
||||||
|
# fd with parent and/or siblings, which would be bad
|
||||||
|
from eventlet import hubs
|
||||||
|
hubs.use_hub()
|
||||||
|
|
||||||
cookie = Cookie.SimpleCookie()
|
cookie = Cookie.SimpleCookie()
|
||||||
cookie.load(self.headers.getheader('cookie'))
|
cookie.load(self.headers.getheader('cookie'))
|
||||||
token = cookie['token'].value
|
token = cookie['token'].value
|
||||||
|
|
Loading…
Reference in New Issue