Esempio n. 1
0
 private static Embed GetEmbed(string ip, ushort port, Game game)
 {
     try
     {
         try
         {
             return(GetEmbedThrowError(ip, port, game));
         }
         catch
         {
             Logger.LogWarning("QueryMaster", "Error querying, retrying");
             // Tries two times, in case the data is malformed due to using UDP
             return(GetEmbedThrowError(ip, port, game));
         }
     }
     catch (Exception e)
     {
         return(Logger.LogException(e));
     }
 }
Esempio n. 2
0
        private static Embed GetEmbedThrowError(string ip, ushort port, Game game)
        {
            var server = ServerQuery.GetServerInstance(game, ip, port, receiveTimeout: 1000, throwExceptions: true);

            return(GetSourceServerReplyEmbed(server));
        }