Skip to content

v0.17.1

Choose a tag to compare

@nicobailon nicobailon released this 15 Oct 05:13
· 36 commits to main since this release

This patch release fixes three bugs reported by users. Extension state now actually saves on Windows. A plain reply now goes to the session that asked you something, instead of whoever sent an earlier message that didn't start a turn. The broker also stays healthy when one session stops reading its messages: before, a single stuck session could make the broker's memory grow by gigabytes over weeks.

Highlights

  • Extension state now saves on Windows. Before, every save failed quietly.
  • A plain reply answers the ask you are working on, not an older message that came in without starting a turn.
  • One stuck session can no longer make the broker's memory grow without limit.

Fixed

  • On Windows, extension state was never saved. Every save failed with Failed to persist extension state, because Windows won't flush a file that was opened read-only. The broker now opens the file for writing first. If a save still fails, the message now includes the underlying error. Thanks to @coylemichael for issue #166.
  • A plain intercom({ action: "reply" }) could answer the wrong session. A message that didn't start a turn stayed queued. That covers every message under inboundTrigger: "never" and non-replies under "replies". The next turn then replied to that message's sender instead of the ask the turn was about, and the asker waited until its ask timed out. A plain reply now answers the one ask that arrived since the last turn. If several asks arrived at once, it asks you to name the session with to. Thanks to @peterdsharpe for issue #167.
  • The broker kept every message for a session that had stopped reading from its connection, so one stuck session could grow the broker's memory without limit. One report reached 6 GB over a month. The broker now drops a connection once more than 8 MB is waiting for it, and later messages for that session wait in its mailbox, as with any other disconnect. Waiting messages also no longer use far more memory than their size. A session that reconnects to a large backlog still gets all of it. Thanks to @luwanglin for issue #168.