hbusc.go | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
hbusc.go
@@ -6,6 +6,7 @@ "encoding/json" "errors" "fmt" "os" "strconv" "sync" "time" @@ -80,7 +81,7 @@ } //Register func Register(ctx context.Context, config *Config, ri *RegisterInfo) (*BHBus,error) { func Register(ctx context.Context, q chan os.Signal, config *Config, ri *RegisterInfo) (*BHBus,error) { handle := &BHBus{ conf: config, m: make(map[string]*sockServer), @@ -113,7 +114,7 @@ loop: for { select { case <-ctx.Done(): case <-q: return handle,errors.New("ctx is done") default: if msg == nil {