Skip to content

Commit

Permalink
allow wake from preflight dialed connections
Browse files Browse the repository at this point in the history
  • Loading branch information
tidwall committed Dec 20, 2017
1 parent e07d3a9 commit 703dc17
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions evio_loop.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,12 @@ func serve(events Events, lns []*listener) error {
}
c := idconn[id]
if c == nil || c.fd == 0 {
ok = false
if c.opening {
c.wake = true
ok = true
} else {
ok = false
}
} else if !c.wake {
c.wake = true
err = internal.AddWrite(p, c.fd, &c.readon, &c.writeon)
Expand Down Expand Up @@ -421,7 +426,6 @@ func serve(events Events, lns []*listener) error {
accept:
nfd, rsa, err = syscall.Accept(fd)
if err != nil {
println(err.Error())
goto next
}
if err = syscall.SetNonblock(nfd, true); err != nil {
Expand Down

0 comments on commit 703dc17

Please sign in to comment.