Try just moving the disconnect to only happen on active connections