lib/async/redis/client.rb in async-redis-0.4.1 vs lib/async/redis/client.rb in async-redis-0.4.2
- old
+ new
@@ -16,19 +16,19 @@
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
-require_relative 'pool'
require_relative 'context/pipeline'
require_relative 'context/transaction'
require_relative 'context/subscribe'
require_relative 'protocol/resp2'
require 'async/io'
require 'async/io/stream'
+require 'async/pool/controller'
require 'protocol/redis/methods'
module Async
module Redis
@@ -137,11 +137,11 @@
end
end
protected
- def connect(connection_limit: nil)
- Pool.new(connection_limit) do
+ def connect(**options)
+ Async::Pool::Controller.wrap(**options) do
peer = @endpoint.connect
peer.setsockopt(Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1)
stream = IO::Stream.new(peer)