Skip to content

Commit

Permalink
Fixed port assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
juliosueiras committed Feb 26, 2020
1 parent 9b9b4d8 commit 28ac09f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion langserver/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package langserver

import (
"context"
"fmt"
"github.com/creachadair/jrpc2"
"github.com/creachadair/jrpc2/channel"
"github.com/creachadair/jrpc2/handler"
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit 28ac09f

Please # to comment.