Merge pull request #6 from cpuguy83/ctx_termination

Backport Honor context termination