Fix attribute error on particularly bad connections

When simulating 80% packet loss, it was discovered that a console
being close() due to inability to complete session establishment
will not have keepaliveid registered yet.

Change-Id: I839645b13cbe30ae71e104c44e63896a4802befe