On Thursday, September 20, 2018 at 5:50:51 AM UTC-6, Dean Wang wrote:
>
>
>> new connection, new underlying io.Writer, why keep the previous pending
> data?
>
>
It's a new connection to the same destination. I want the bytes I wrote to
reach that destination, even if we have to negotiate a
If bufio.Writer.Flush() ever sees an error, it sets b.err and will
immediately return that error on any future calls to Flush:
https://golang.org/src/bufio/bufio.go?s=14569:14599#L558
Writer.Reset(w io.Writer) will clear the error and set the bufio.Writer to
use the new io.Writer given, but it