Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
Merge pull request #780 from lifupan/master
Browse files Browse the repository at this point in the history
channel: fix the issue of epoll_wait interrupted by signal
  • Loading branch information
Julio Montes authored May 8, 2020
2 parents f481f6b + 1eb1abe commit 1b65736
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"os"
"path/filepath"
"strings"
"syscall"
"time"

"github.com/hashicorp/yamux"
Expand Down Expand Up @@ -194,6 +195,10 @@ func (c *serialChannel) wait() error {
for {
nev, err := unix.EpollWait(epfd, events[:], -1)
if err != nil {
if err == syscall.EINTR {
continue
}

return err
}

Expand Down

0 comments on commit 1b65736

Please sign in to comment.