Skip to content

Commit

Permalink
chore: change to listen to locahost only (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
ordsweng authored Mar 21, 2023
1 parent 5320601 commit ca98ffb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ca98ffb

Please sign in to comment.