summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2017-06-12 23:41:03 +0200
committerDimitri Sokolyuk <demon@dim13.org>2017-06-12 23:41:03 +0200
commit21676ae36723bfd9780971ef80bdcdeab01219ad (patch)
tree22231057fdb6eff76fb9fc0d3ea59a74fc3c4637
parent513eee8a5672efe0164fed20cb1e6de0e689aed3 (diff)
buffer chan
-rw-r--r--main.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.go b/main.go
index 161b5e4..dc153f7 100644
--- a/main.go
+++ b/main.go
@@ -32,7 +32,7 @@ type Data struct {
}
func dump(dir Direction, src, dst net.Conn, data chan<- Data) error {
- buf := make([]byte, 1452)
+ buf := make([]byte, 4096)
for k := 1; ; k++ {
n, err := src.Read(buf)
if err != nil {
@@ -66,7 +66,7 @@ func main() {
}
defer cnt.Close()
- data := make(chan Data)
+ data := make(chan Data, 1)
wg.Add(2)
go func() {