This completes #52 and must be landed prior to the tests added in #49 and #51.
I ended up cleaning up a lot of stuff to get this working alongside background jobs (which turn out have the same response event type as sendmsg requests) including:
using CHANNEL_DESTROY events to trigger session destruction
removing a bunch of insane logic from the BACKGROUND_JOB handler which was required because we were previously using CHANNEL_HANGUP as the session destroyer
This completes #52 and must be landed prior to the tests added in #49 and #51.
I ended up cleaning up a lot of stuff to get this working alongside background jobs (which turn out have the same response event type as
sendmsg
requests) including:CHANNEL_DESTROY
events to trigger session destructionBACKGROUND_JOB
handler which was required because we were previously usingCHANNEL_HANGUP
as the session destroyer