-
-
Notifications
You must be signed in to change notification settings - Fork 567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ssl.SSLError during handshake can teardown worker process #111
Conversation
The abnormal case is that, when TcpConnectionUninitializedException is raised the worker process close the listening socket making the worker not work any more. |
I am wondering why is
Do you have an example stack trace for further investigation? Are you using |
In my case, class ProtocolHandler(threading.Thread):
def __init__
...
conn = self.optionally_wrap_socket(self.fromfd(fileno))
if conn is None:
raise TcpConnectionUninitializedException() I'm not using |
Makes sense, indeed ssl wrap can fail. However, I think we can improve here a little so that we can log more helpful context. Logging How about we remove the Then in the worker we can:
Wdyt? |
Sounds better and I've changed the code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks.
has started. This is a follow up to this PR #111
* Initialize skeleton electron app * Attempt to open devtools * Electron free * Initialize public/devtools * Add basic support for static file serving and chrome devtools. 1. No cache header management for static file serving yet. 2. No chunked encoded responses for static files yet. 3. Chrome Devtool initialization. * Fix static serving with query params * profile using py-spy * Complete websocket client loop * lint check * Add support for building websocket frames * Remove redundant CDT params * Lint check * Refactor web server base plugin name * Devtools integrated, need more polish * Add START_TIME global var * lint fix * Remove outdated chrome rdp * Add FAQs * Add FAQs * socket_connection decorator + context manager * Defer SSL handshake and plugin initialize until protocol handler thread has started. This is a follow up to this PR #111 * Add tests for new_socket_connection and its friend socket_connection * Address an issue which came back after being fixed in #92 * Lint fixes * uff ye str and bytes * Remove explicit flushes outside of write ready descriptor handlers * add links to import proxy * Only try websocket upgrade if a route is registered * Add plugin_examples.WebServerPlugin and use precision logging for levelname * Remove redundant comments * Add --devtools-ws-path flag * Add on_websocket_open and on_websocket_close callbacks * Add empty stubs for incomplete CDT responses * Ensure client is ready before final flush * Shutdown on write side of socket, may be client is still reading * Since client.closed can be set, explicitly call client.connection.closed * Add ModifyPostDataPlugin example. Was first asked and referenced here #115 * Start adding TestHttpProxyPlugin * Fixes #116
prevent socket which is listening been close when TcpConnectionUninitializedException is raised