diff --git a/manager.c b/manager.c index d0c3eef2b7c5085a1025704c0fc5a40e05d59739..f868b95603005f862b054abd926ba341015ac19f 100755 --- a/manager.c +++ b/manager.c @@ -1301,6 +1301,7 @@ static int get_input(struct mansession *s, char *output) res = poll(fds, 1, -1); if (res < 0) { ast_log(LOG_WARNING, "Select returned error: %s\n", strerror(errno)); + return -1; } else if (res > 0) { ast_mutex_lock(&s->lock); res = read(s->fd, s->inbuf + s->inlen, sizeof(s->inbuf) - 1 - s->inlen);