Browse Source

chan resize +1

guodongxiaren 3 năm trước cách đây
mục cha
commit
9ce0402ba0
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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()) {