You've already forked json-iterator
mirror of
https://github.com/json-iterator/go.git
synced 2025-06-30 23:23:49 +02:00
#177 flush buffer should check available again
This commit is contained in:
@ -191,6 +191,9 @@ func (stream *Stream) ensure(minimal int) {
|
||||
func (stream *Stream) growAtLeast(minimal int) {
|
||||
if stream.out != nil {
|
||||
stream.Flush()
|
||||
if stream.Available() >= minimal {
|
||||
return
|
||||
}
|
||||
}
|
||||
toGrow := len(stream.buf)
|
||||
if toGrow < minimal {
|
||||
|
Reference in New Issue
Block a user