Created
March 3, 2009 01:19
-
-
Save readruby/73118 to your computer and use it in GitHub Desktop.
/thin/backends/base.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Source: | |
| # http://github.com/macournoyer/thin/blob/d6334d80e2c21af8b6d9647b9ae17d687df825df/lib/thin/backends/base.rb | |
| # Initialize a new connection to a client. | |
| def initialize_connection(connection) | |
| connection.backend = self | |
| connection.app = @server.app | |
| connection.comm_inactivity_timeout = @timeout | |
| connection.threaded = @threaded | |
| # We control the number of persistent connections by keeping | |
| # a count of the total one allowed yet. | |
| if @persistent_connection_count < @maximum_persistent_connections | |
| connection.can_persist! | |
| @persistent_connection_count += 1 | |
| end | |
| @connections << connection | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment