Apparently, InetAddress.getLocalHost doesn't actually return localhost.
authorFredrik Tolf <fredrik@dolda2000.com>
Tue, 29 Mar 2011 06:21:23 +0000 (08:21 +0200)
committerFredrik Tolf <fredrik@dolda2000.com>
Tue, 29 Mar 2011 06:21:23 +0000 (08:21 +0200)
src/dolda/jsvc/scgi/DirServer.java

index ef38a93..0b70e9c 100644 (file)
@@ -111,9 +111,9 @@ public class DirServer extends Server {
        File datroot = null;
        InetAddress bindaddr;
        try {
-           bindaddr = InetAddress.getLocalHost();
+           bindaddr = InetAddress.getByName(null);
        } catch(UnknownHostException e) {
-           throw(new Error("WTF?!", e));
+           throw(new Error(e));
        }
        for(char c : opt.parsed()) {
            switch(c) {