Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
overvenus committed Jun 23, 2017
1 parent e2f56dd commit 7f39fc3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/api/history_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
package api

import (
"context"
"encoding/json"
"fmt"
"net/http"

. "github.com/pingcap/check"
"github.com/pingcap/kvproto/pkg/pdpb"
"github.com/pingcap/pd/server"
"golang.org/x/net/context"
)

var _ = Suite(&testHistorySuite{})
Expand Down
5 changes: 4 additions & 1 deletion server/grpc_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,10 @@ func (s *Server) RegionHeartbeat(server pdpb.PD_RegionHeartbeatServer) error {
return errors.Trace(err)
}

// TODO: should we check headers here?
if err := s.validateRequest(request.GetHeader()); err != nil {
// TODO: How to close this stream?
return errors.Trace(err)
}

cluster := s.GetRaftCluster()
if cluster == nil {
Expand Down

0 comments on commit 7f39fc3

Please sign in to comment.