File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -514,9 +514,6 @@ const TOKEN_END = EndToken()
514
514
515
515
function Base. write (stream:: TranscodingStream , :: EndToken )
516
516
changemode! (stream, :write )
517
- if stream. state. code == :end
518
- callstartproc (stream, :write )
519
- end
520
517
flushbufferall (stream)
521
518
flushuntilend (stream)
522
519
return 0
Original file line number Diff line number Diff line change @@ -228,7 +228,7 @@ DoubleFrameDecoderStream(stream::IO; kwargs...) = TranscodingStream(DoubleFrameD
228
228
end == " [ HHeelllloo,, wwoorrlldd..\n\n ]"
229
229
end
230
230
231
- @testset " TOKEN_END repeated creates empty frames" begin
231
+ @testset " TOKEN_END repeated doesn't create more empty frames" begin
232
232
sink = IOBuffer ()
233
233
stream = TranscodingStream (DoubleFrameEncoder (), sink, stop_on_end= true )
234
234
write (stream, TranscodingStreams. TOKEN_END)
@@ -237,9 +237,10 @@ DoubleFrameDecoderStream(stream::IO; kwargs...) = TranscodingStream(DoubleFrameD
237
237
write (stream, TranscodingStreams. TOKEN_END)
238
238
write (stream, " de" )
239
239
write (stream, TranscodingStreams. TOKEN_END)
240
+ write (stream, " " ) # This doesn't create an empty frame
240
241
write (stream, TranscodingStreams. TOKEN_END)
241
242
close (stream)
242
- @test String (take! (sink)) == " [ ][ ][ aabbcc ][ ddee ][ ]"
243
+ @test String (take! (sink)) == " [ ][ aabbcc ][ ddee ]"
243
244
end
244
245
245
246
test_roundtrip_read (DoubleFrameEncoderStream, DoubleFrameDecoderStream)
You can’t perform that action at this time.
0 commit comments