Merge pull request #17 from kevwan/patch-1

Update evio_loop.go
This commit is contained in:
Josh Baker 2018-03-21 15:11:54 -07:00 committed by GitHub
commit 751f59108a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -363,9 +363,11 @@ func serve(events Events, lns []*listener) error {
c := v.(*unixConn)
if now.After(v.Timeout()) {
timeoutqueue.Pop()
lock()
if _, ok := idconn[c.id]; ok && c.opening {
delete(idconn, c.id)
delete(fdconn, c.fd)
unlock()
filladdrs(c)
syscall.Close(c.fd)
if events.Opened != nil {
@ -384,6 +386,8 @@ func serve(events Events, lns []*listener) error {
}
}
count++
} else {
unlock()
}
} else {
break