p2p: allow listener with no external connection

This commit is contained in:
Ethan Buchman
2017-07-19 15:03:36 -04:00
parent 7f5908b622
commit ddb3d8945d
3 changed files with 9 additions and 16 deletions

View File

@ -144,6 +144,7 @@ type WSRPCContext struct {
//
// Determine if its a unix or tcp socket.
// If tcp, must specify the port; `0.0.0.0` will return incorrectly as "unix" since there's no port
// TODO: deprecate
func SocketType(listenAddr string) string {
socketType := "unix"
if len(strings.Split(listenAddr, ":")) >= 2 {