Skip to content

Falcon and Async#close #101

@tleish

Description

@tleish

When using async gems (e.g. async-http or async-redis) as part of a falcon request, is #close necessary for each request, or will the connections auto-close as part of falcon?

e.g.

def anything
	internet = Async::HTTP::Internet.new
	headers = [['accept', 'application/json']]
	body = [JSON.dump(data)]
	internet.post("https://httpbin.org/anything", headers, body)
ensure
	internet.close
end

or

def something
	endpoint = Async::Redis.local_endpoint
	client = Async::Redis::Client.new(endpoint)
	client.set('X', 10)
ensure
	client.close
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions