fastlane/lib/fastlane/server/socket_server.rb in fastlane-2.98.0 vs fastlane/lib/fastlane/server/socket_server.rb in fastlane-2.99.0
- old
+ new
@@ -17,20 +17,22 @@
def initialize(
command_executor: nil,
return_value_processor: nil,
connection_timeout: 5,
- stay_alive: false
+ stay_alive: false,
+ port: 2000
)
if return_value_processor.nil?
return_value_processor = JSONReturnValueProcessor.new
end
@command_executor = command_executor
@return_value_processor = return_value_processor
@connection_timeout = connection_timeout.to_i
@stay_alive = stay_alive
+ @port = port.to_i
end
# this is the public API, don't call anything else
def start
listen
@@ -133,10 +135,10 @@
end
return COMMAND_EXECUTION_STATE[:ready]
end
def listen
- @server = TCPServer.open('localhost', 2000) # Socket to listen on port 2000
+ @server = TCPServer.open('localhost', @port) # Socket to listen on port 2000
UI.verbose("Waiting for #{@connection_timeout} seconds for a connection from FastlaneRunner")
# set thread local to ready so we can check it
Thread.current[:ready] = true
@client = nil