lichao
2021-04-13 047f801078a52042ef02750b577233d115ed0f57
src/socket.cpp
@@ -45,11 +45,12 @@
{
   auto onRecvWithPerMsgCB = [this, onData](ShmSocket &socket, MsgI &imsg, BHMsgHead &head) {
      RecvCB cb;
      if (async_cbs_->Find(head.msg_id(), cb)) {
      if (per_msg_cbs_->Find(head.msg_id(), cb)) {
         cb(socket, imsg, head);
      } else if (onData) {
         onData(socket, imsg, head);
      } // else ignored, or dropped
      } else { // else ignored, or dropped
      }
   };
   auto recvLoopBody = [this, onRecvWithPerMsgCB, onIdle]() {
@@ -61,7 +62,8 @@
            if (imsg.ParseHead(head)) {
               onRecvWithPerMsgCB(*this, imsg, head);
            }
         } else if (onIdle) {
         }
         if (onIdle) {
            onIdle(*this);
         }
      } catch (...) {