Set ->message to prevent undef error

This commit is contained in:
Jan M. Hochstein 2016-06-18 15:46:05 +02:00
parent d0e08b32f5
commit 2157f22669
1 changed files with 9 additions and 8 deletions

View File

@ -145,17 +145,18 @@ sub send_receive {
}
if($last_response) {
$self->code();
$self->message();
$self->is_success(1);
$self->status('OK');
$self->set_code();
$self->set_message("");
$self->set_is_success(1);
$self->set_status('OK');
}
else{
$self->code();
$self->message();
$self->is_success(0);
$self->status('TIMEOUT');
$self->set_code();
$self->set_message("Timed out waiting for response");
$self->set_is_success(0);
$self->set_status('TIMEOUT');
}
return $last_response;
}