diff options
author | Yangqing Jia <jiayq84@gmail.com> | 2015-07-19 09:13:07 -0700 |
---|---|---|
committer | Yangqing Jia <jiayq84@gmail.com> | 2015-07-19 09:13:07 -0700 |
commit | 571ee16b44cb46225344dc9d4b967f35fbf25a55 (patch) | |
tree | 6eb09d173405fdf476630e76360366b6d7c1abb9 /caffe2/binaries | |
parent | cfab4ed865be42f54decfe5a1f8672d0befceca1 (diff) | |
download | pytorch-571ee16b44cb46225344dc9d4b967f35fbf25a55.tar.gz pytorch-571ee16b44cb46225344dc9d4b967f35fbf25a55.tar.bz2 pytorch-571ee16b44cb46225344dc9d4b967f35fbf25a55.zip |
minor change
Diffstat (limited to 'caffe2/binaries')
-rw-r--r-- | caffe2/binaries/zmq_feeder.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/caffe2/binaries/zmq_feeder.cc b/caffe2/binaries/zmq_feeder.cc index 5144653855..75ecc2ed53 100644 --- a/caffe2/binaries/zmq_feeder.cc +++ b/caffe2/binaries/zmq_feeder.cc @@ -50,13 +50,12 @@ int main(int argc, char** argv) { string key = cursor->key(); zmq::message_t key_msg(key.size()); memcpy(key_msg.data(), key.data(), key.size()); - while (!sender.send(key_msg, ZMQ_SNDMORE)) { - VLOG(1) << "Trying re-sending key..."; - } - string value = cursor->value(); zmq::message_t value_msg(value.size()); memcpy(value_msg.data(), value.data(), value.size()); + while (!sender.send(key_msg, ZMQ_SNDMORE)) { + VLOG(1) << "Trying re-sending key..."; + } while(!sender.send(value_msg)) { VLOG(1) << "Trying re-sending..."; } |