Hi,
Today, i received panic from bufio reader. I used bufio for tcp connections. The function running for 30 days without problem.
Here is the sample code:
func TCPReader(connection *net.TCPConn) {
reader := bufio.NewReaderSize(connection, 8192)
header := make([]byte, 9)
for {
len, err := reader.Read(header[:])
}
}
Panic Log:
panic: runtime error: slice bounds out of range
goroutine 490939 [running]:
bufio.(*Reader).Read(0xc828791f80, 0xc82858b670, 0x9, 0x9, 0x0, 0x0, 0x0)
/usr/local/go/src/bufio/bufio.go:214 +0x3c8