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

net: add tcp_connect - an alternate version of with_tcp_connect accepting Switch.t argument. #425

Closed

Conversation

bikallem
Copy link
Contributor

Part of the fix for mirage/ocaml-cohttp#965.

After this is merged Client.call should take an (optional? not decided yet) sw argument too.

@bikallem
Copy link
Contributor Author

/cc @talex5

Copy link
Collaborator

@talex5 talex5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The point of the with_* functions is that you don't need a switch. It would be better to have a separate tcp_connect that takes ~sw and doesn't take f if you need that.

@bikallem bikallem changed the title net: add optional ?sw argument to with_tcp_connect net: add tcp_connect - an alternate version of with_tcp_connect accepting Switch.t argument. Jan 30, 2023
@bikallem
Copy link
Contributor Author

@talex5 I have added new function tcp_connect as you suggested. This takes switch as an argument so the connection outlives the function call.

ci seems to be failing due to an error below.

2023-01-31 09:30.50: Waiting for resource in pool OCluster

2023-01-31 09:30.50: Waiting for worker…

2023-01-31 09:30.50: Got resource from pool OCluster

Building on cree.ocamllabs.io

Uncaught exception: Unix.Unix_error(Unix.ENOMEM, "fork", "")

2023-01-31 09:30.51: Job failed: Failed: Internal error

@bikallem bikallem requested a review from talex5 January 31, 2023 18:21
@bikallem
Copy link
Contributor Author

closing this for now.

@bikallem bikallem closed this Mar 24, 2023
@bikallem bikallem deleted the with-tcp-connect-switch branch March 24, 2023 23:39
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

Successfully merging this pull request may close these issues.

None yet

2 participants