Setting a delay on the leave call helps avoid a race condition where the leave is issues right before a concluding subscribe request is made.
Removed 3rd party http
wip