Skip to content

Commit

Permalink
Made PONG look for the first numeric char after ' '
Browse files Browse the repository at this point in the history
  • Loading branch information
Will Sobel committed Nov 27, 2013
1 parent 2182831 commit c0f84f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion agent/connector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ void Connector::sendCommand(const string &aCommand)
void Connector::startHeartbeats(const string &aArg)
{
size_t pos;
if (aArg.length() > 7 && aArg[6] == ' ' && (pos = aArg.find_first_not_of(' ', 6)) != string::npos && aArg.length() > pos) {
if (aArg.length() > 7 && aArg[6] == ' ' && (pos = aArg.find_first_of("0123456789", 7)) != string::npos) {
int freq = atoi(aArg.substr(pos).c_str());

// Make the maximum timeout 30 minutes.
Expand Down

0 comments on commit c0f84f4

Please sign in to comment.