lichao
2021-05-20 68c7bef33e74f23aa0136ccd6f7faa654d671ebc
box/center.cpp
@@ -124,20 +124,14 @@
         } else {
            replyer(MakeReply(eSuccess));
            if (clients.empty()) { return; }
            auto it = clients.begin();
            do {
               auto &cli = *it;
            for (auto &cli : clients) {
               auto node = cli.weak_node_.lock();
               if (node) {
                  // should also make sure that mq is not killed before msg expires.
                  // it would be ok if (kill_time - offline_time) is longer than expire time.
                  socket.Send({cli.mq_id_, cli.mq_abs_addr_}, msg);
                  ++it;
               } else {
                  it = clients.erase(it);
               }
            } while (it != clients.end());
            }
         }
      };
      switch (head.type()) {