Skip to content

Commit

Permalink
reflect breaking API changes
Browse files Browse the repository at this point in the history
  • Loading branch information
radeksimko committed Jul 20, 2021
1 parent 3cca140 commit f2350b1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion internal/langserver/handlers/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ func (svc *service) Assigner() (jrpc2.Assigner, error) {
return convertMap(m), nil
}

func (svc *service) Finish(status jrpc2.ServerStatus) {
func (svc *service) Finish(_ jrpc2.Assigner, status jrpc2.ServerStatus) {
if status.Closed() || status.Err != nil {
svc.logger.Printf("session stopped unexpectedly (err: %v)", status.Err)
}
Expand Down
6 changes: 4 additions & 2 deletions internal/langserver/langserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,10 @@ func Server(svc server.Service, opts *jrpc2.ServerOptions) (*singleServer, error
}

return &singleServer{
srv: jrpc2.NewServer(assigner, opts),
finishFunc: svc.Finish,
srv: jrpc2.NewServer(assigner, opts),
finishFunc: func(status jrpc2.ServerStatus) {
svc.Finish(assigner, status)
},
}, nil
}

Expand Down
2 changes: 1 addition & 1 deletion internal/langserver/session/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

type Session interface {
Assigner() (jrpc2.Assigner, error)
Finish(jrpc2.ServerStatus)
Finish(jrpc2.Assigner, jrpc2.ServerStatus)
SetLogger(*log.Logger)
}

Expand Down

0 comments on commit f2350b1

Please sign in to comment.