Skip to content

client connection has been closed by peer #363

@lkxiaolou

Description

@lkxiaolou

Describe the bug
仅使用 netpoll client 进行建连,当 server 设置 ReadTimeout 比较小时,例如这样:

// server
func main() {
	s := http.Server{
		ReadTimeout: time.Millisecond,
	}

	ln, err := net.Listen("tcp", ":8000")
	if err != nil {
		panic(err)
	}
	s.Serve(ln)
}

// client
dialer := netpoll.NewDialer()
conn, err := dialer.DialTimeout("tcp", "127.0.0.1:8000", 2*time.Second)

client 压力大,调度慢时出现 client connection has been closed by peer 报错,原生 net 则不会

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions