if port is empty string, no listening

This commit is contained in:
zelig 2015-01-02 18:54:59 +00:00
parent acc8ff3079
commit c610c53a9e

View file

@ -89,11 +89,14 @@ func New(db ethutil.Database, identity p2p.ClientIdentity, keyManager *crypto.Ke
Identity: identity,
MaxPeers: maxPeers,
Protocols: protocols,
ListenAddr: ":" + port,
Blacklist: eth.blacklist,
NAT: nat,
}
if len(port) > 0 {
server.ListenAddr = ":" + port
}
eth.server = server
return eth, nil