Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Increase max wait time from 500ms to 1s. This is kind of a sloppy fix, so it can really only be done to a point. However, there seems to be at least one scenario where, for some reason, AMI is (apparently) legitimately blocking for longer than 500ms but less than 1s. Example debug: 1657483794:439 : 169 : DATA FROM AMI 1657483794:439 : 263 : Asterisk left us high and dry for the end of the response, polling again... 1657483794:489 : 158 : Response pending this loop (13180/1048576)! 1657483795:808 : 158 : Response pending this loop (13180/1048576)! 1657483795:808 : 169 : DATA FROM AMI 1657483795:808 : 229 : Unsolicited event 1657483795:808 : 719 : <== AMI Response: Response: Success What's a bit strange is that even though it's blocked for about 320 ms in this example, the size of the response doesn't actually increase by the time the response finishes. However, the existing code does successfully detect an EOM at that point and dispatch the response. So, to account for this, we increase the max wait time to 1000ms which should at least address this kind of situation.
- Loading branch information