[lib] Clear inflightRequests before triggering reconnect
[lib] Clear inflightRequests before triggering reconnect

Summary:
Currently, because we update Redux before we clear `inflightRequests` here, if the Redux update immediately triggers a reconnect, that reconnect will get clobbered when its new `inflightRequests` is cleared.

By clearing `inflightRequests` first, we make sure that it doesn't mess with any later connection attempts.

Reviewers: palys-swm

Reviewed By: palys-swm

Subscribers: KatPo, zrebcu411, Adrian

Differential Revision: https://phabricator.ashoat.com/D225

Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal