service: reset tempDelay when retrying after accept error #52
This commit is contained in:
@@ -166,6 +166,10 @@ func (s *defaultService) Serve() error {
|
||||
for {
|
||||
conn, e := s.listener.Accept()
|
||||
if e != nil {
|
||||
if _, ok := e.(*listener.AcceptError); ok {
|
||||
tempDelay = 0
|
||||
}
|
||||
|
||||
// TODO: remove Temporary checking
|
||||
if ne, ok := e.(net.Error); ok && ne.Temporary() {
|
||||
if tempDelay == 0 {
|
||||
|
||||
Reference in New Issue
Block a user