manager: Terminate session on write error.
On a write error to an AMI session a flag was set to indicate that the write error had occurred, with the expected result being that the session be terminated. This was not actually happening and instead writing would continue to be attempted. This change adds a check for the write error and causes the session to actually terminate. ASTERISK-29948 Change-Id: Icaf5d413d4c0d5dc78292a17287fecc8720a31a5
This commit is contained in:
parent
069a996bd8
commit
d33050f172
|
@ -6242,7 +6242,7 @@ static int process_events(struct mansession *s)
|
|||
(s->session->readperm & eqe->category) == eqe->category &&
|
||||
(s->session->send_events & eqe->category) == eqe->category) {
|
||||
if (match_filter(s, eqe->eventdata)) {
|
||||
if (send_string(s, eqe->eventdata) < 0)
|
||||
if (send_string(s, eqe->eventdata) < 0 || s->write_error)
|
||||
ret = -1; /* don't send more */
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue