'This is called when an AMP connection is (re-)established
between server and portal. AMP calls it on both sides, so we
need to make sure to only trigger resync from the portal side.'

def connectionMade(self):

    self.transport.setTcpNoDelay(True)
    if hasattr(self.factory, 'portal'):
        sessdata = self.factory.portal.sessions.get_all_sync_data()
        self.send_AdminPortal2Server(DUMMYSESSION, PSYNC, sessiondata=sessdata)
        self.factory.portal.sessions.at_server_connection()
        if hasattr(self.factory, 'server_restart_mode'):
            del self.factory.server_restart_mode
