multiple small fixes
[govpp.git] / core / core.go
index 7dc45de..550b6a7 100644 (file)
@@ -207,13 +207,16 @@ func (c *Connection) processRequest(ch *api.Channel, chMeta *channelMetadata, re
                "msg_size": len(data),
        }).Debug("Sending a message to VPP.")
 
-       c.vpp.SendMsg(chMeta.id, data)
-
        if req.Multipart {
-               // multipart request
+               // expect multipart response
                atomic.StoreUint32(&chMeta.multipart, 1)
+       }
 
-               // send a control ping
+       // send the request to VPP
+       c.vpp.SendMsg(chMeta.id, data)
+
+       if req.Multipart {
+               // send a control ping to determine end of the multipart response
                ping := &vpe.ControlPing{}
                pingData, _ := c.codec.EncodeMsg(ping, c.pingReqID)