From 28ac09f8ca15d918b97d757838c56a205855f42b Mon Sep 17 00:00:00 2001 From: Julio Tain Sueiras Date: Tue, 25 Feb 2020 20:07:12 -0500 Subject: [PATCH] Fixed port assignment --- langserver/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/langserver/main.go b/langserver/main.go index 6f895ee..daca2e2 100644 --- a/langserver/main.go +++ b/langserver/main.go @@ -2,6 +2,7 @@ package langserver import ( "context" + "fmt" "github.com/creachadair/jrpc2" "github.com/creachadair/jrpc2/channel" "github.com/creachadair/jrpc2/handler" @@ -63,7 +64,7 @@ func RunTCPServer(port int) { // Start the server on a channel comprising stdin/stdout. - lst, err := net.Listen("tcp", "127.0.0.1:9900") + lst, err := net.Listen("tcp", fmt.Sprintf("127.0.0.1:%d", port)) if err != nil { log.Fatalf("Listen: %v", err) }