Skip to content

Commit

Permalink
FIX: Flush write buffer to logs immediately
Browse files Browse the repository at this point in the history
  • Loading branch information
matricali committed Jul 28, 2024
1 parent 1eedb14 commit 339e0e3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Division by zero when progress bar has no elements
- Update total work to do after targets filtering
- ssh_free releases the memory allocated for banner
- Flush write buffer to logs immediately

### Removed

Expand Down
2 changes: 2 additions & 0 deletions src/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ void btkg_log_successfull_login(FILE *stream, const char *hostname, int port,
// Print buffer
fprintf(stream, "%s", output);
free(output);
fflush(stream);

return;

Expand Down Expand Up @@ -233,6 +234,7 @@ void btkg_log_target_found(FILE *stream, const char *hostname, int port,
// Print buffer
fprintf(stream, "%s", output);
free(output);
fflush(stream);

return;

Expand Down

0 comments on commit 339e0e3

Please sign in to comment.