Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider adding option to force close - killing all in-flight connections. #168

Open
ioquatix opened this issue Jul 18, 2024 · 1 comment

Comments

@ioquatix
Copy link
Member

def close
while @pool.busy?
Console.logger.warn(self) {"Waiting for #{@protocol} pool to drain: #{@pool}"}
@pool.wait
end
@pool.close
end

The after hook can hang if a test fails without closing all responses:

				def after
					@client&.close
					@server_task&.stop
					@bound_endpoint&.close
					
					super
				end

Maybe introduce @client&.close(force = true) OR @client&.stop (force close). I'm a little worried about side effects since the connection pool may not contain all active connections.

@ioquatix
Copy link
Member Author

You could reproduce this behaviour with a test response = client.get then raises an exception in sus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant