-
Notifications
You must be signed in to change notification settings - Fork 87
Refactor: +SocketMixin #114
Refactor: +SocketMixin #114
Conversation
Catch up.
This might conflict some with #113. Not sure what order wouldn't produce a conflict. |
end | ||
|
||
def deoptimize_socket(socket) | ||
socket.setsockopt(6, 3, 0) if socket.kind_of? TCPSocket |
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.
These magic constants could use a comment.
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.
RUBY_PLATFORM
only, or all the Socket::
constants and the symbols also?
The Socket
constants are notoriously hard to find documentation on, but RUBY_PLATFORM
will be set to whatever the OS is, and only Linux supports the behavior expected of #optimize_socket
This seems like a good time to also add a |
… more deoptimizations, and non-linux optimizations.
@digitalextremist the timeout situation is a bit dire. I'm in the process of refactoring all the requests and response state machines into |
Right now, socket optimizations happen per-connection vs. per-server, and SSLServer is not covered... which this refactor resolves by using
SocketMixin
across both servers, and going full per-server vs. per-connection.