Skip to content

Commit 3249595

Browse files
authored
Daemon now listen to localhost-only (#763)
1 parent af891c6 commit 3249595

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: cli/daemon/daemon.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ func runDaemonCommand(cmd *cobra.Command, args []string) {
9696
}()
9797
}
9898

99-
logrus.Infof("Starting daemon on TCP port %s", port)
100-
lis, err := net.Listen("tcp", fmt.Sprintf(":%s", port))
99+
logrus.Infof("Starting daemon on TCP address 127.0.0.1:%s", port)
100+
lis, err := net.Listen("tcp", fmt.Sprintf("127.0.0.1:%s", port))
101101
if err != nil {
102102
// Invalid port, such as "Foo"
103103
var dnsError *net.DNSError
@@ -121,7 +121,7 @@ func runDaemonCommand(cmd *cobra.Command, args []string) {
121121
os.Exit(errorcodes.ErrGeneric)
122122
}
123123
// This message will show up on the stdout of the daemon process so that gRPC clients know it is time to connect.
124-
logrus.Infof("Daemon is listening on TCP port %s...", port)
124+
logrus.Infof("Daemon is now listening on 127.0.0.1:%s...", port)
125125
if err := s.Serve(lis); err != nil {
126126
logrus.Fatalf("Failed to serve: %v", err)
127127
}

0 commit comments

Comments
 (0)