Add custom websocket header to strategy class

This commit is contained in:
Sebastian Serth
2021-10-11 23:11:40 +02:00
parent 08f36a0a7a
commit 58e923abd8
4 changed files with 16 additions and 1 deletions

View File

@@ -17,7 +17,7 @@ class Runner::Connection
# Internally, Faye::WebSocket uses EventMachine and the `ping` value is used to wake the EventMachine thread
# The `tls` option is used to customize the validation of TLS connections.
# Passing `nil` as a `root_cert_file` is okay and done so for the DockerContainerPool.
@socket = Faye::WebSocket::Client.new(url, [], ping: 0.1, tls: {root_cert_file: Runner.strategy_class.config[:ca_file]})
@socket = Faye::WebSocket::Client.new(url, [], strategy.websocket_header.merge(ping: 0.1))
@strategy = strategy
@status = :established
@event_loop = event_loop