handle reconnects.