Explorar o código

Modified the webserver to listen on 0.0.0.0

Patrick Falls %!s(int64=12) %!d(string=hai) anos
pai
achega
4f43803025

+ 2 - 2
grizzly-jersey/benchmark_config

@@ -5,7 +5,7 @@
       "setup_file": "setup",
       "json_url": "/json",
       "port": 8080,
-      "sort": 30
+      "sort": 38
     }
   }]
-}
+}

+ 1 - 1
grizzly-jersey/setup.py

@@ -15,7 +15,7 @@ def stop():
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   out, err = p.communicate()
   for line in out.splitlines():
-    if 'grizzly-jersey' in line:
+    if 'grizzly-jersey' in line and 'jar' in line:
       pid = int(line.split(None, 2)[1])
       os.kill(pid, 9)
   return 0

+ 1 - 1
grizzly-jersey/src/main/java/hello/HelloWebServer.java

@@ -26,7 +26,7 @@ public class HelloWebServer {
   }
 
   private static URI getBaseUrl(int port) {
-    return UriBuilder.fromUri("http://localhost/").port(port).build();
+    return UriBuilder.fromUri("http://0.0.0.0/").port(port).build();
   }
 
   public static void main(String[] args) throws Exception {