Bug 883053 - Restore the original connection when connection fails.

https://bugzilla.mozilla.org/show_bug.cgi?id=883053