Skip to content

Commit

Permalink
plugin: Always set the completion time, independently of outcome
Browse files Browse the repository at this point in the history
Reported-by: @thestick613
Fixes #3848
  • Loading branch information
cdecker committed Jul 18, 2020
1 parent 65ca634 commit c75b0ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/libplugin-pay.c
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,7 @@ payment_waitsendpay_finished(struct command *cmd, const char *buffer,
struct route_hop *hop;
assert(p->route != NULL);

p->end_time = time_now();
p->result = tal_sendpay_result_from_json(p, buffer, toks);

if (p->result == NULL) {
Expand All @@ -677,7 +678,6 @@ payment_waitsendpay_finished(struct command *cmd, const char *buffer,

if (p->result->state == PAYMENT_COMPLETE) {
payment_set_step(p, PAYMENT_STEP_SUCCESS);
p->end_time = time_now();
payment_continue(p);
return command_still_pending(cmd);
}
Expand Down

0 comments on commit c75b0ac

Please sign in to comment.