Skip to content

Commit f3a770d

Browse files
module's Init function shouldn't be called before api is ready (#268)
1 parent e06a6ae commit f3a770d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/ServiceInstance.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ func ModuleExecute(id, module, sock string) {
172172
fmt.Printf("I am: %s\n", id)
173173

174174
api := NewModuleAPIClient(sock)
175-
mss.Init(api)
176175
// call in, and get a control chan
177176
cc, e := api.ServiceInit(id, module)
178177
if e != nil {
@@ -242,6 +241,7 @@ func ModuleExecute(id, module, sock string) {
242241
mc.UpdateConfig(defaults)
243242
}
244243

244+
mss.Init(api)
245245
if config {
246246
updateConfig()
247247
}

0 commit comments

Comments
 (0)