diff options
Diffstat (limited to 'btio')
-rw-r--r-- | btio/btio.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/btio/btio.c b/btio/btio.c index a3cf38a3..918eea87 100644 --- a/btio/btio.c +++ b/btio/btio.c @@ -1133,8 +1133,10 @@ gboolean bt_io_accept(GIOChannel *io, BtIOConnect connect, gpointer user_data, } if (!(pfd.revents & POLLOUT)) { - int ret; - ret = read(sock, &c, 1); + if (read(sock, &c, 1) < 0) { + ERROR_FAILED(err, "read", errno); + return FALSE; + } } accept_add(io, connect, user_data, destroy); |