Skip to content

Commit d4b8581

Browse files
committed
handler: use constant for "$/cancelRequest"
1 parent 9397f83 commit d4b8581

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ func Call(ctx context.Context, conn jsonrpc2.Conn, method string, params, result
7676
func notifyCancel(ctx context.Context, conn jsonrpc2.Conn, id jsonrpc2.ID) {
7777
ctx = xcontext.Detach(ctx)
7878
// Note that only *jsonrpc2.ID implements json.Marshaler.
79-
conn.Notify(ctx, "$/cancelRequest", &CancelParams{ID: &id})
79+
conn.Notify(ctx, MethodCancelRequest, &CancelParams{ID: &id})
8080
}
8181

8282
func replyParseError(ctx context.Context, reply jsonrpc2.Replier, err error) error {

0 commit comments

Comments
 (0)