fixed multiple reconnect attempts when backgrounding