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

Unix: don't leak FDs if Network.connect fails #206

Merged
merged 1 commit into from
Jul 3, 2020

Conversation

talex5
Copy link
Contributor

@talex5 talex5 commented Jul 3, 2020

Also, use Lwt to open connections so we don't block the whole process.

Also, use `Lwt` to open connections so we don't block the whole process.
Copy link
Member

@djs55 djs55 left a comment

Choose a reason for hiding this comment

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

Makes sense!

@talex5 talex5 merged commit 756ad57 into mirage:master Jul 3, 2020
@talex5 talex5 deleted the close-sockets branch July 3, 2020 16:05
talex5 added a commit to talex5/opam-repository that referenced this pull request Jul 17, 2020
…rpc and capnp-rpc-net (0.8.0)

CHANGES:

Bug fixes and diagnostics:

- Don't GC imports with callbacks (@talex5, mirage/capnp-rpc#210).

- Improve "Already resolved!" error message (@talex5, mirage/capnp-rpc#209).
  Show the state of the promise we were trying to set, and what we tried to set it to.

- Reject attempts to send after disconnecting (@talex5, mirage/capnp-rpc#208).

- Unix: don't leak FDs if `Network.connect` fails (@talex5, mirage/capnp-rpc#206).
  Also, use `Lwt` to open connections so we don't block the whole process.

New functions:

- Add `Sturdy_ref.with_cap` and `with_cap_exn` convenience functions (@talex5, mirage/capnp-rpc#207).
  Using the plain `connect` functions, it's easy to forget to release the live-ref at the end.

Build changes:

- capnp-rpc-mirage: adapt test to tcpip 5.0.0 API (@hannesm, mirage/capnp-rpc#205).

- Upgrade to dune 2 (@talex5, mirage/capnp-rpc#204).

- Switch tests to build in native code and use the test stanza (@avsm, mirage/capnp-rpc#203).

Documentation:

- Show how to make a connection directly (@talex5, mirage/capnp-rpc#202).
  The new `test-bin/calc_direct.ml` example shows how a parent process can
  spawn a child and communicate with it directly over a socketpair.
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.

2 participants