Skip to content

Commit

Permalink
Use updated syntax for bound endpoints.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Apr 23, 2024
1 parent de33a0b commit 6e1957d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion fixtures/server_context.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def before
super

# We bind the endpoint before running the server so that we know incoming connections will be accepted:
@bound_endpoint = ::Async::IO::SharedEndpoint.bound(endpoint)
@bound_endpoint = Sync{endpoint.bound}

@server_endpoint = make_server_endpoint(@bound_endpoint)
mock(@server_endpoint) do |wrapper|
Expand Down
4 changes: 1 addition & 3 deletions lib/falcon/service/supervisor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ def handle(message)
def start
Console.logger.info(self) {"Binding to #{self.endpoint}..."}

@bound_endpoint = Async::Reactor.run do
Async::IO::SharedEndpoint.bound(self.endpoint)
end.wait
@bound_endpoint = Sync{self.endpoint.bound}

super
end
Expand Down

0 comments on commit 6e1957d

Please sign in to comment.