Explorar o código

debug on cool_dns

Paul Klumpp %!s(int64=12) %!d(string=hai) anos
pai
achega
a0ce6e827c
Modificáronse 1 ficheiros con 6 adicións e 2 borrados
  1. 6 2
      em_server.rb

+ 6 - 2
em_server.rb

@@ -455,10 +455,14 @@ class GameServers
 
   def get_cool_dns(iphost, ipport)
     put_log "get_cool_dns drin"
-    @gameservers.fetch("#{iphost}:#{ipport}").fetch(:cool_dns)
+    cool_dns = @gameservers.fetch("#{iphost}:#{ipport}").fetch(:cool_dns)
+    put_log "cool_dns for #{iphost}:#{ipport} is: #{cool_dns}"
+    return cool_dns
   rescue
     scanserver("#{iphost}:#{ipport}", "qw")
-    @gameservers.fetch("#{iphost}:#{ipport}").fetch(:cool_dns)
+    cool_dns = @gameservers.fetch("#{iphost}:#{ipport}").fetch(:cool_dns)
+    put_log "cool_dns for #{iphost}:#{ipport} is: #{cool_dns}"
+    return cool_dns
   end
 
   private # all following methods are private