Skip to content
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

fix(server): use a timeout for Server keep-alive #661

Merged
merged 1 commit into from
Oct 9, 2015

Conversation

seanmonstar
Copy link
Member

Server keep-alive is now off by default. In order to turn it on, the
keep_alive method must be called on the Server object.

Closes #368


self.handler.on_connection_end();

debug!("keep_alive loop ending for {}", addr);
}

fn set_timeouts(&self, s: & &mut NetworkStream) -> io::Result<()> {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The double indirection is crappy, but using a generic wasn't really possible, since the type is erased into a trait object inside the keep alive loop. And since NetworkStream requires 'static, I couldn't implement the trait for &mut T. Fun.

Server keep-alive is now **off** by default. In order to turn it on, the
`keep_alive` method must be called on the `Server` object.

Closes #368
seanmonstar added a commit that referenced this pull request Oct 9, 2015
fix(server): use a timeout for Server keep-alive
@seanmonstar seanmonstar merged commit 579d735 into master Oct 9, 2015
@seanmonstar seanmonstar deleted the keep-alive-timeout branch October 9, 2015 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant