Skip to content

Commit

Permalink
Merge branch '1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
henricasanova committed Jul 12, 2018
2 parents f06a182 + cbee94a commit dbd457c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
6 changes: 3 additions & 3 deletions include/wrench/services/Service.h
Expand Up @@ -113,10 +113,10 @@ namespace wrench {
/** @brief The service's name */
std::string name;

/** @brief The time (in seconds) after which a service that doesn't send back a reply message cause
* a NetworkTimeOut exception. (default: 1 second; if <0 never timeout)
/** @brief The time (in seconds) after which a service that doesn't send back a reply (control) message causes
* a NetworkTimeOut exception. (default: 30 second; if <0 never timeout)
*/
double network_timeout = 1.0;
double network_timeout = 30.0;

/***********************/
/** \endcond */
Expand Down
5 changes: 2 additions & 3 deletions src/wrench/services/storage/StorageService.cpp
Expand Up @@ -347,7 +347,7 @@ namespace wrench {
try {
message = S4U_Mailbox::getMessage(answer_mailbox, this->network_timeout);
} catch (std::shared_ptr<NetworkError> &cause) {
throw WorkflowExecutionException(cause);
throw;
}

if (auto msg = dynamic_cast<StorageServiceFileReadAnswerMessage *>(message.get())) {
Expand All @@ -362,8 +362,7 @@ namespace wrench {
try {
file_content_message = S4U_Mailbox::getMessage(answer_mailbox);
} catch (std::shared_ptr<NetworkError> &cause) {
WRENCH_INFO("Unknown Error while getting a file content.... means we should just die. but throwing");
throw WorkflowExecutionException(cause);
throw;
}

if (auto file_content_msg = dynamic_cast<StorageServiceFileContentMessage *>(file_content_message.get())) {
Expand Down
8 changes: 7 additions & 1 deletion src/wrench/workflow/execution_events/FailureCause.cpp
Expand Up @@ -336,7 +336,13 @@ namespace wrench {
} else {
operation = "receiving from";
}
return "Network error (link failure, or communication peer died) while " + operation + " mailbox_name " + this->mailbox;
std::string error;
if (this->isTimeout()) {
error = "timeout";
} else {
error = "link failure, or communication peer died";
}
return "Network error (" + error + ") while " + operation + " mailbox_name " + this->mailbox;
};

// /**
Expand Down

0 comments on commit dbd457c

Please sign in to comment.