All those lines of code dealt with the Session startup and connection reconnecting. If you review where the variables were used you would see that the logic removed that accessed those variables was solely to reconnect connections in a decaying fashion. 

The CreateSession logic was adjsuted with this patch as it was interleaved with the connection reconnect logic.

I can adjust the description but I think what is there fits the work of the pull request.