Skip to content

Commit

Permalink
Avoid double-close in async IO test
Browse files Browse the repository at this point in the history
  • Loading branch information
aturon committed Nov 16, 2022
1 parent ecf75f1 commit 21833f6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test-fixtures/src/bin/async_io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,10 @@ fn test_select() -> Result<(), Error> {
append_header(&mut ds_resp, "Ready-Index", ready_idx);
}

let close_status = unsafe { fastly_sys::fastly_http_body::close(write_body_handle) };
assert!(close_status.is_ok());
// check that handles are still available after the select, by explicitly closing them:
assert!(simple_pending_req.close().is_ok());
assert!(read_body.close().is_ok());
assert!(write_body.close().is_ok());

ds_resp.send_to_client(BodyHandle::new());
Ok(())
Expand Down

0 comments on commit 21833f6

Please sign in to comment.