Skip to content
This repository has been archived by the owner on Dec 7, 2018. It is now read-only.

Remove optimize function #158

Merged
merged 3 commits into from
Aug 12, 2014
Merged

Remove optimize function #158

merged 3 commits into from
Aug 12, 2014

Conversation

czaks
Copy link
Contributor

@czaks czaks commented Aug 9, 2014

This function is only used by the servers. Except... it is wrapped with this code:

if socket.is_a? TCPSocket

Obviously, TCPSocket refers to C::IO::TCPSocket and not to ::TCPSocket. In the both servers' contexts, things to optimize are: Celluloid::IO::TCPServer. C::IO::TCPServer is not a C::IO::TCPSocket, nor it subclasses one, so the code never evaluates.

After some talk with @tarcieri on IRC, he told me, that the function doesn't make sense on a listener (ie. server) socket. And it isn't used in any other context.

Thus, the pull request just removes unused code.

tarcieri added a commit that referenced this pull request Aug 12, 2014
@tarcieri tarcieri merged commit aea3faa into celluloid:master Aug 12, 2014
@tarcieri
Copy link
Member

Indeed! Disabling Nagle on a server's listen socket probably isn't going to do a whole hell of a lot 😉

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants