Ver código fonte

chan resize +1

guodongxiaren 3 anos atrás
pai
commit
9ce0402ba0
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      tools/rpc_replay/rpc_replay.cpp

+ 1 - 1
tools/rpc_replay/rpc_replay.cpp

@@ -77,7 +77,7 @@ int ChannelGroup::Init() {
         max_protocol_size = std::max(max_protocol_size,
                                      (size_t)protocols[i].first);
     }
-    _chans.resize(max_protocol_size);
+    _chans.resize(max_protocol_size + 1);
     for (size_t i = 0; i < protocols.size(); ++i) {
         if (protocols[i].second.support_client() &&
             protocols[i].second.support_server()) {