Adds reconnection support.