bytedance/dbatman

[TODO] ADD the proxy front client ReadTimeOut

Opened this issue · 0 comments

for
 {
	if b.timeout > 0 {
		if err := b.nc.SetReadDeadline(time.Now().Add(b.timeout)); err != nil {
				return err
			}
		}

		nn, err := b.nc.Read(b.buf[n:])

In buffer module use buffer.timeout to set read timeout ,but the dbatman proxy itself doesn;t set the config module in dsn para so it value always be 0 .and in sometimes the goroutine will not relaease.
result in
goroutine 117092 [IO wait, 12663 minutes]:
net.runtime_pollWait(0x7f0aec5f85f0, 0x72, 0xc8206ef000)
/usr/local/go/src/runtime/netpoll.go:160 +0x60
net.(*pollDesc).Wait(0xc8205bc450, 0x72, 0x0, 0x0)
/usr/local/go/src/net/fd_poll_runtime.go:73 +0x3a
net.(*pollDesc).WaitRead(0xc8205bc450, 0x0, 0x0)