Restored the continuation logic fix.
Restored the continuation logic fix.

Commit aa1cfd38f544ea9fa615200ebf7612e05ac32031 fixed a race in a
continuation in endpoint authorisation, while commit
608e3823dbc19fabf70687840f27b1a628ac0cd6 unintentionally rolled it
back. This patch restores the original fix.

Review: https://reviews.apache.org/r/49049/

jpeach/mesos,asamerh4/mesos,gsantovena/mesos,Aman-Jain-14/customizedMesos,gsantovena/mesos,yuquanshan/customizedMesos,Aman-Jain-14/customizedMesos,yuquanshan/customizedMesos,craimbert/mesos,verizonlabs/mesos,reneploetz/mesos,chhsia0/mesos,andschwa/mesos,asamerh4/mesos,zmalik/mesos,gsantovena/mesos,zmalik/mesos,asamerh4/mesos,Gilbert88/mesos,Aman-Jain-14/customizedMesos,yuquanshan/customizedMesos,jpeach/mesos,dforsyth/mesos,neilconway/mesos,verizonlabs/mesos,Gilbert88/mesos,kaysoky/mesos,chhsia0/mesos,craimbert/mesos,reneploetz/mesos,abudnik/mesos,asamerh4/mesos,Gilbert88/mesos,kaysoky/mesos,jpeach/mesos,zmalik/mesos,Gilbert88/mesos,Aman-Jain-14/customizedMesos,andschwa/mesos,kaysoky/mesos,abudnik/mesos,neilconway/mesos,gsantovena/mesos,craimbert/mesos,dforsyth/mesos,verizonlabs/mesos,asamerh4/mesos,gsantovena/mesos,reneploetz/mesos,Gilbert88/mesos,jpeach/mesos,kaysoky/mesos,zmalik/mesos,chhsia0/mesos,abudnik/mesos,kaysoky/mesos,kaysoky/mesos,abudnik/mesos,jpeach/mesos,Gilbert88/mesos,zmalik/mesos,craimbert/mesos,jpeach/mesos,chhsia0/mesos,gsantovena/mesos,yuquanshan/customizedMesos,verizonlabs/mesos,Gilbert88/mesos,dforsyth/mesos,zmalik/mesos,andschwa/mesos,andschwa/mesos,reneploetz/mesos,chhsia0/mesos,abudnik/mesos,yuquanshan/customizedMesos,abudnik/mesos,neilconway/mesos,reneploetz/mesos,dforsyth/mesos,asamerh4/mesos,chhsia0/mesos,gsantovena/mesos,dforsyth/mesos,yuquanshan/customizedMesos,jpeach/mesos,neilconway/mesos,yuquanshan/customizedMesos,craimbert/mesos,andschwa/mesos,neilconway/mesos,craimbert/mesos,neilconway/mesos,abudnik/mesos,andschwa/mesos,verizonlabs/mesos,neilconway/mesos,reneploetz/mesos,kaysoky/mesos,craimbert/mesos,zmalik/mesos,chhsia0/mesos,dforsyth/mesos,reneploetz/mesos,Aman-Jain-14/customizedMesos,verizonlabs/mesos,andschwa/mesos,dforsyth/mesos,verizonlabs/mesos,asamerh4/mesos,Aman-Jain-14/customizedMesos,Aman-Jain-14/customizedMesos