From ca98ffb4c4c7cb9a058d16ee51a03293f8d993bb Mon Sep 17 00:00:00 2001 From: "woohyuk(neth)" Date: Tue, 21 Mar 2023 23:08:33 +0900 Subject: [PATCH] chore: change to listen to locahost only (#12) --- server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.go b/server.go index 0235c42..4cc1b5d 100644 --- a/server.go +++ b/server.go @@ -12,7 +12,7 @@ type server struct { // newServer starts and returns a server listening on a given port. func newServer(port uint16) (*server, error) { - l, err := net.Listen("tcp", fmt.Sprintf(":%d", port)) + l, err := net.Listen("tcp", fmt.Sprintf("localhost:%d", port)) if err != nil { log.Printf("failed to listen on port: %d", port) return nil, err