Skip to content

Commit

Permalink
fix: add check error
Browse files Browse the repository at this point in the history
Signed-off-by: Zixuan Liu <nodeces@gmail.com>
  • Loading branch information
nodece committed Apr 7, 2021
1 parent a57d360 commit 5bab3ba
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dispatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ func NewHRaftDispatcher(config *Config) (*HRaftDispatcher, error) {
} else {
ln, err = tls.Listen("tcp", config.ListenAddress, config.TLSConfig)
}
if err != nil {
return nil, err
}

mux := cmux.New(ln)
httpLn := mux.Match(cmux.HTTP1Fast())
Expand Down Expand Up @@ -275,6 +278,6 @@ func (h *HRaftDispatcher) Shutdown() error {
}

// Stats is used to get stats of currently service.
func (h *HRaftDispatcher) Stats()(map[string]interface{},error) {
func (h *HRaftDispatcher) Stats() (map[string]interface{}, error) {
return h.store.Stats()
}

0 comments on commit 5bab3ba

Please sign in to comment.