Skip to content

Commit

Permalink
#flush is already synchronised.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Apr 23, 2024
1 parent 57ef23f commit f4198ea
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/protocol/http2/connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -214,16 +214,20 @@ def receive_goaway(frame)
def write_frame(frame)
synchronize do
@framer.write_frame(frame)
@framer.flush
end

# The IO is already synchronized, and we don't want additional contention.
@framer.flush
end

def write_frames
if @framer
synchronize do
yield @framer
@framer.flush
end

# See above note.
@framer.flush
else
raise EOFError, "Connection closed!"
end
Expand Down

0 comments on commit f4198ea

Please sign in to comment.