浏览代码

Fix for initializing NodeIO variables to 0. (Resolves the server crash when instantiating experiments with >18 servers)

Sajin 1 年之前
父节点
当前提交
9775d8e843
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      App/net.cpp

+ 4 - 1
App/net.cpp

@@ -18,7 +18,9 @@
 NetIO *g_netio = NULL;
 
 NodeIO::NodeIO(tcp::socket &&socket, nodenum_t nodenum) :
-    sock(std::move(socket)), node_num(nodenum)
+    sock(std::move(socket)), node_num(nodenum), msgsize_inflight(0),
+    chunksize_inflight(0), recv_msgsize_inflight(0),
+    recv_chunksize_inflight(0)
 {
 }
 
@@ -197,6 +199,7 @@ void NetIO::ing_receive_msgbundle(tcp::socket* csocket, clientid_t c_simid)
             return;
         }
 
+
         //Ingest the message_bundle
         bool ret = ecall_ingest_msgbundle(c_simid, msgbundle, conf.m_priv_out);
         free(msgbundle);