Skip to content

Commit 992019e

Browse files
authored
Merge pull request #10814 from ccutrer/server-fast-stdout
Write to stdout ASAP in server mode
2 parents 997d66f + 795f830 commit 992019e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* [#10814](https://github.com/rubocop/rubocop/pull/10814): Avoid buffering stdout when running in server mode. ([@ccutrer][])

lib/rubocop/server/client_command/base.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def send_request(command:, args: [], body: '')
2929
socket.puts [Cache.token_path.read, Dir.pwd, command, *args].shelljoin
3030
socket.write body
3131
socket.close_write
32-
$stdout.write socket.read(4096) until socket.eof?
32+
$stdout.write socket.readpartial(4096) until socket.eof?
3333
end
3434
end
3535

0 commit comments

Comments
 (0)