Skip to content

Commit

Permalink
Merge pull request #1039 from mrpalide/fixbug/eof-startup-dmsghttp
Browse files Browse the repository at this point in the history
Fix EOF error on stratup visor
  • Loading branch information
jdknives authored Jan 7, 2022
2 parents 9e9f849 + f87f9c8 commit b692244
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/visor/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ func initDmsgHTTP(ctx context.Context, v *Visor, log *logging.Logger) error {

pk, sk := cipher.GenerateKeyPair()
keys = append(keys, pk)
dClient := direct.NewClient(direct.GetAllEntries(keys, servers), v.MasterLogger().PackageLogger("dmsg_http:direct_client"))
entries := direct.GetAllEntries(keys, servers)
dClient := direct.NewClient(entries, v.MasterLogger().PackageLogger("dmsg_http:direct_client"))

dmsgDC, closeDmsgDC, err := direct.StartDmsg(ctx, v.MasterLogger().PackageLogger("dmsg_http:dmsgDC"),
pk, sk, dClient, dmsg.DefaultConfig())
Expand All @@ -197,6 +198,7 @@ func initDmsgHTTP(ctx context.Context, v *Visor, log *logging.Logger) error {
v.dmsgHTTP = &dmsgHTTP
v.dmsgDC = dmsgDC
v.initLock.Unlock()
time.Sleep(time.Duration(len(entries)) * time.Second)
return nil
}

Expand Down

0 comments on commit b692244

Please sign in to comment.