Skip to content

Daemon listen to localhost #763

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 26, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cli/daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ func runDaemonCommand(cmd *cobra.Command, args []string) {
}()
}

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