utils/conn: fix a socket error in windows

This commit is contained in:
fatedier
2016-06-06 11:43:41 +08:00
parent 04014bb78f
commit 2640c0b570
4 changed files with 15 additions and 7 deletions

View File

@@ -2,6 +2,7 @@ package main
import (
"fmt"
"io"
"frp/utils/conn"
)
@@ -31,6 +32,9 @@ func main() {
func echoWorker(c *conn.Conn) {
for {
buff, err := c.ReadLine()
if err == io.EOF {
break
}
if err != nil {
fmt.Printf("echo server read error: %v\n", err)
return