Skip to content

How to receive the session.shutdown event? #490

@theblixguy

Description

@theblixguy

I'm trying to access totalPremiumRequests and other data from the session.shutdown event but never see it fire. I log every event type from session.on() and get assistant.usage, session.idle, etc but never session.shutdown.

My sessions are long-lived and reused, so destroy() isn't called during normal use. On process exit I call client.stop() (which calls destroy() internally) but still nothing shows up. Looking at the source, it looks like destroy() clears all event handlers right after the RPC resolves, which might be before the shutdown notification arrives.

What's the intended way to get this data?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions