mirror of https://github.com/schollz/croc.git
flush once
This commit is contained in:
parent
cc0ef58b9f
commit
8ddd7aff06
|
@ -41,7 +41,6 @@ func (c *Comm) Close() {
|
|||
|
||||
func (c *Comm) Write(b []byte) (int, error) {
|
||||
c.writer.Write([]byte(fmt.Sprintf("%0.6d", len(b))))
|
||||
c.writer.Flush()
|
||||
n, err := c.writer.Write(b)
|
||||
if n != len(b) {
|
||||
err = fmt.Errorf("wanted to write %d but wrote %d", n, len(b))
|
||||
|
|
Loading…
Reference in New Issue