fix issue where restarting a cluster logged "invalid pilosa.Message"

we were sending pilosa.Message objects from a spool, but actually
passing a pointer to them rather than the Message itself. I'm
concerned this wasn't caught in any test, and also curious if that
needed to be a pointer for some reason or if it's a typo.

Definitely need to write a test still.
This commit is contained in:
Matt Jaffee 2021-03-05 12:51:39 -06:00
parent fa9e17878f
commit 08d4511e6c
No known key found for this signature in database
GPG key ID: 08A3DFFF987B11BF

View file

@ -679,7 +679,7 @@ func (s *Server) Open() error {
s.logger.Printf("start initial cluster state sync")
for i := range toSend {
for {
err := s.holder.broadcaster.SendSync(&toSend[i])
err := s.holder.broadcaster.SendSync(toSend[i])
if err != nil {
s.logger.Printf("failed to broadcast startup cluster message (trying again in a bit): %v", err)
timer.Reset(time.Second)