Skip to content

Commit

Permalink
Fix error code
Browse files Browse the repository at this point in the history
  • Loading branch information
yzang2019 committed Mar 12, 2024
1 parent 8c577d5 commit c27c86e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions rpc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package rpc

import (
"context"
"fmt"
"io"
"sync"
"sync/atomic"
Expand Down Expand Up @@ -162,7 +161,7 @@ func (s *Server) serveSingleRequest(ctx context.Context, codec ServerCodec) {
for _, req := range reqs {
method := req.Method
if _, found := s.denyList[method]; found {
resp := errorMessage(&methodNotFoundError{fmt.Sprintf("method %s is in deny list", method)})
resp := errorMessage(&methodNotFoundError{method: method})
codec.writeJSON(ctx, resp, true)
return
}
Expand Down

0 comments on commit c27c86e

Please sign in to comment.