added resume on connection loss functionality