Skip to content

Commit

Permalink
chore: upgrade to irohv0.31.0
Browse files Browse the repository at this point in the history
  • Loading branch information
“ramfox” committed Jan 14, 2025
1 parent 7ca5fc7 commit 36ad540
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,8 @@ url = "2.5.0"
[features]
# generate headers
headers = ["safer-ffi/headers"]

[patch.crates-io]

iroh = { git = "https://github.com/n0-computer/iroh.git", branch = "iroh-0-31-0" }
iroh-base = { git = "https://github.com/n0-computer/iroh.git", branch = "iroh-0-31-0" }
2 changes: 1 addition & 1 deletion irohnet.h
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ endpoint_bind (
*
* Consumes the endpoint, no need to free it afterwards.
*/
EndpointResult_t
void
endpoint_close (
Endpoint_t * ep);

Expand Down
11 changes: 2 additions & 9 deletions src/endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -862,8 +862,8 @@ pub fn endpoint_connect(
///
/// Consumes the endpoint, no need to free it afterwards.
#[ffi_export]
pub fn endpoint_close(ep: repr_c::Box<Endpoint>) -> EndpointResult {
let res = TOKIO_EXECUTOR.block_on(async move {
pub fn endpoint_close(ep: repr_c::Box<Endpoint>) {
TOKIO_EXECUTOR.block_on(async move {
ep.ep
.write()
.await
Expand All @@ -872,13 +872,6 @@ pub fn endpoint_close(ep: repr_c::Box<Endpoint>) -> EndpointResult {
.close()
.await
});
match res {
Ok(()) => EndpointResult::Ok,
Err(err) => {
dbg!(err);
EndpointResult::CloseError
}
}
}

/// Get the the node dialing information of this iroh endpoint.
Expand Down

0 comments on commit 36ad540

Please sign in to comment.