Compare commits

...
Author SHA1 Message Date
Leonid Bugaev e1b8132abb Revert "Properly handle errors on input sockets" 2015-03-03 12:01:40 +05:00
+5 -6
View File
@@ -62,12 +62,6 @@ func (i *TCPInput) handleConnection(conn net.Conn) {
for {
buf, err := reader.ReadBytes('¶')
if err == io.EOF {
return
} else if err != nil {
log.Println("Unexpected error in input tcp connection", err)
return
}
buf_len := len(buf)
if buf_len > 0 {
new_buf_len := len(buf) - 2
@@ -75,6 +69,11 @@ func (i *TCPInput) handleConnection(conn net.Conn) {
new_buf := make([]byte, new_buf_len)
copy(new_buf, buf[:new_buf_len])
i.data <- new_buf
if err != nil {
if err != io.EOF {
log.Printf("error: %s\n", err)
}
}
}
}
}