master: Added auto-reconnect