From bfea94d0a7f2c8961f1a8f1f5a04b8e5ace763e8 Mon Sep 17 00:00:00 2001 From: dongmen <414110582@qq.com> Date: Thu, 23 Dec 2021 12:10:37 +0800 Subject: [PATCH] *: fix check error --- cdc/http_handler.go | 1 - cdc/http_status.go | 2 -- cdc/server.go | 2 -- 3 files changed, 5 deletions(-) diff --git a/cdc/http_handler.go b/cdc/http_handler.go index 291cb97bf29..7b5580d4333 100644 --- a/cdc/http_handler.go +++ b/cdc/http_handler.go @@ -85,7 +85,6 @@ func (s *Server) handleResignOwner(w http.ResponseWriter, req *http.Request) { return nil }) handleOwnerResp(w, err) - return } func (s *Server) handleChangefeedAdmin(w http.ResponseWriter, req *http.Request) { diff --git a/cdc/http_status.go b/cdc/http_status.go index efddc52e453..fc384932a69 100644 --- a/cdc/http_status.go +++ b/cdc/http_status.go @@ -116,7 +116,6 @@ func (s *Server) handleDebugInfo(w http.ResponseWriter, req *http.Request) { s.capture.WriteDebugInfo(w) fmt.Fprintf(w, "\n\n*** etcd info ***:\n\n") s.writeEtcdInfo(req.Context(), s.etcdClient, w) - return } func (s *Server) handleStatus(w http.ResponseWriter, req *http.Request) { @@ -131,7 +130,6 @@ func (s *Server) handleStatus(w http.ResponseWriter, req *http.Request) { st.IsOwner = s.capture.IsOwner() } writeData(w, st) - return } func writeInternalServerError(w http.ResponseWriter, err error) { diff --git a/cdc/server.go b/cdc/server.go index 3f00925b23a..9f2885445ec 100644 --- a/cdc/server.go +++ b/cdc/server.go @@ -20,7 +20,6 @@ import ( "os" "path/filepath" "strings" - "sync" "time" "github.com/pingcap/errors" @@ -55,7 +54,6 @@ const ( type Server struct { capture *capture.Capture - ownerLock sync.RWMutex statusServer *http.Server pdClient pd.Client etcdClient *kv.CDCEtcdClient