2dee9ccbbc
We currently cancel the context when the adapter function is done. We should wait for the entire handler we're wrapping to finish before cancelling our context.