added an error throw to the 'end' listener, so a dead server will trigger an error/reconnect attempt, and a disconnect method for local disconnect attempts