Skip to content

Commit

Permalink
Merge pull request #7 from paullouisageneau/fix-client-interrupt
Browse files Browse the repository at this point in the history
Fix client interrupt
  • Loading branch information
paullouisageneau committed Aug 22, 2023
2 parents 6f075b3 + a369eb3 commit 37492b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ void client_destroy(client_t *client) {

int client_start(client_t *client) {
if (client->is_started) {
PLUM_LOG_WARN("Client is already started");
PLUM_LOG_DEBUG("Client is already started");
return 0;
}

Expand Down Expand Up @@ -471,7 +471,7 @@ int client_run_protocol(client_t *client, const protocol_t *protocol,
}

int client_interrupt(client_t *client, bool stop) {
if (client->is_started)
if (!client->is_started)
return PROTOCOL_ERR_SUCCESS;

PLUM_LOG_DEBUG("Interrupting protocol");
Expand Down

0 comments on commit 37492b5

Please sign in to comment.