Skip to content

v0.7.2

Choose a tag to compare

@joaquinbejar joaquinbejar released this 24 Oct 19:48
· 5 commits to main since this release
ce42afa

Fixed

  • server: ServerHandle::close_session and shutdown now write the messages already queued for a session before closing it, so a handler can reply and then close reliably (#71, #72).
    • The flush is bounded by one second, so a peer that stops reading cannot hold a closing session open.
    • Cancellation has priority over a pending read, and queued output is written before more input is read. Under heavy inbound traffic, replies are neither lost nor starved.
    • Messages queued after the close starts are dropped.

Added

  • codegen: every var data field gets a fallible try_set_<field>, returning Result<&mut Self, ironsbe_core::VarDataError> (#70, #73).
    • It checks write order, length header range and buffer capacity before writing anything, including the empty headers of skipped parts. On error the buffer and cursor are unchanged.
    • A try_set_* name that would clash with a group accessor gets a trailing underscore.
  • codegen: GeneratorOptions::with_panicking_setters(false), with Generator::with_options and generate_from_{xml,file}_with_options, omits the panicking set_<field> setters. The generated code then has no panic! calls and builds under deny(clippy::panic). It can still panic at runtime through assert! and slice bounds, which #74 tracks.
  • core: VarDataError (LengthOverflow, OutOfOrder, BufferTooShort).

Changed

  • codegen: set_<field> is now a wrapper over try_set_<field>. The panic message for an oversized value now reads length N bytes exceeds the length header maximum M.

cargo semver-checks reports no semver update required for every published crate.

Full changelog: v0.7.1...v0.7.2