-
-
Notifications
You must be signed in to change notification settings - Fork 155
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
added @ before stream_socket_accept in src/Server.php ... #23
Conversation
… server from crashing right before being able to handle the same error
The changes LGTM 👍 Can you give some steps to reproduce this so we can add this to the test suite? Thanks! |
+1 on @clue comment, the changes LGTM but steps to reproduce are very welcome 👍 |
I discovered the problem because an external monitoring tool (HAProxy) opened a TCP socket and closed it immediately after it was opened, causing the exception. That is the reason I do not have a self-contained problem case. Edit: The way to reproduce this is:
This will cause an E_WARNING to pop up ( http://php.net/manual/en/stream.errors.php ) |
I'm very weary about using |
It doesn't seem to be slower than setting and restoring the global error handler. Test: https://3v4l.org/Pscrm I don't really have any qualms with changing it either way, though. Thoughts? |
I'm surprised to see those statistics. As far as I know, the 'silence'-operator was indeed slow as well. |
I'm also surprised by those numbers. Reading @derickr's article on the I'm still in favor of using the |
I agree @WyriHaximus |
Let's move forward and get this in? If anybody has some numbers to back up any performance regressions or happens to write a (better?) patch, please file a new PR and I'm happy to consider this again! |
Agreed |
added @ before stream_socket_accept in src/Server.php ...
Added peer_name to ssl context options
… , preventing the server from crashing right before being able to handle the same error
This fixes the following issue:
#22