Sha256: 36d345cf0f4bc15dd33ff947e6519205e93ec63419aa0ed45937e14b95c5726a
Contents?: true
Size: 697 Bytes
Versions: 30
Compression:
Stored size: 697 Bytes
Contents
# frozen_string_literal: true module Nonnative class HTTPServer < Nonnative::Server def initialize(service) log = File.open(service.log, 'a') events = Puma::Events.new(log, log) @server = Puma::Server.new(app, events) super service end protected def perform_start server.add_tcp_listener '0.0.0.0', proxy.port server.run.join end def perform_stop server.stop(true) end def wait_start timeout.perform do super until server.running end end def wait_stop timeout.perform do super while server.running end end private attr_reader :queue, :server end end
Version data entries
30 entries across 30 versions & 1 rubygems