Skip to content

Commit

Permalink
Merge pull request #109 from b0noI/master
Browse files Browse the repository at this point in the history
The push field  now initialized correctly to false during the creation of an Meta object
  • Loading branch information
piiswrong authored Jul 27, 2017
2 parents acdb698 + e98220b commit bdd4c67
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/ps/internal/message.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ struct Meta {
/** \brief default constructor */
Meta() : head(kEmpty), customer_id(kEmpty), timestamp(kEmpty),
sender(kEmpty), recver(kEmpty),
request(false), simple_app(false) {}
request(false), push(false), simple_app(false) {}
std::string DebugString() const {
std::stringstream ss;
if (sender == Node::kEmpty) {
Expand Down
5 changes: 3 additions & 2 deletions src/van.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace ps {
// don't send heartbeast in default. because if the scheduler received a
// heartbeart signal from a node before connected to that node, then it could be
// problem.
const static int kDefaultHeartbeatInterval = 0;
static const int kDefaultHeartbeatInterval = 0;

Van* Van::Create(const std::string& type) {
if (type == "zmq") {
Expand Down Expand Up @@ -140,7 +140,8 @@ int Van::Send(const Message& msg) {

void Van::Receiving() {
const char* heartbeat_timeout_val = Environment::Get()->find("PS_HEARTBEAT_TIMEOUT");
const int heartbeat_timeout = heartbeat_timeout_val ? atoi(heartbeat_timeout_val) : kDefaultHeartbeatInterval;
const int heartbeat_timeout
= heartbeat_timeout_val ? atoi(heartbeat_timeout_val) : kDefaultHeartbeatInterval;
Meta nodes; // for scheduler usage
while (true) {
Message msg;
Expand Down

0 comments on commit bdd4c67

Please sign in to comment.