diff options
author | 2008-11-16 21:18:30 +0000 | |
---|---|---|
committer | 2008-11-16 21:18:30 +0000 | |
commit | aefc8387e8491d906aa60c59ca973dc9715783ae (patch) | |
tree | 359b94398cdb104b89613941dbe940581b12c92e | |
parent | trigger rproc->eof() and and wproc->hup() if POLLHUP event is set. (diff) | |
download | wireguard-openbsd-aefc8387e8491d906aa60c59ca973dc9715783ae.tar.xz wireguard-openbsd-aefc8387e8491d906aa60c59ca973dc9715783ae.zip |
when the aucat backend is used, sio_revents(3) should return POLLHUP
if the connection to the server is lost.
-rw-r--r-- | lib/libsndio/aucat.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libsndio/aucat.c b/lib/libsndio/aucat.c index 14d6fc393ed..c9aa1752423 100644 --- a/lib/libsndio/aucat.c +++ b/lib/libsndio/aucat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aucat.c,v 1.2 2008/11/11 19:39:35 ratchov Exp $ */ +/* $OpenBSD: aucat.c,v 1.3 2008/11/16 21:18:30 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org> * @@ -554,6 +554,8 @@ aucat_revents(struct sio_hdl *sh, struct pollfd *pfd) if (hdl->maxwrite <= 0) revents &= ~POLLOUT; } + if (hdl->sa.eof) + return POLLHUP; return revents & hdl->events; } |