update selector

This commit is contained in:
ginuerzh
2022-09-04 13:22:34 +08:00
parent 7136710673
commit 99adf4bb06
5 changed files with 16 additions and 19 deletions

View File

@ -85,6 +85,7 @@ func (s *service) Serve() error {
for {
conn, e := s.listener.Accept()
if e != nil {
// TODO: remove Temporary checking
if ne, ok := e.(net.Error); ok && ne.Temporary() {
if tempDelay == 0 {
tempDelay = 1 * time.Second