Skip to content

Commit 54653a9

Browse files
committed
removed: bufio
1 parent 45786a8 commit 54653a9

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

internal/network.go

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package internal
22

33
import (
4-
"bufio"
54
"fmt"
65
"io"
76
"log"
@@ -15,13 +14,10 @@ type network struct {
1514

1615
// send data over tcp.
1716
func (n *network) send(data []byte) error {
18-
writer := bufio.NewWriter(n.connection)
19-
if _, err := writer.Write(data); err != nil {
17+
if _, err := n.connection.Write(data); err != nil {
2018
return fmt.Errorf("failed to send: %v\n", err)
2119
}
2220

23-
_ = writer.Flush()
24-
2521
return nil
2622
}
2723

0 commit comments

Comments
 (0)