monterail / angular-faye

Faye client wrapper for angular
MIT License
46 stars 16 forks source link

Change to use timeout instead of apply #9

Open criles25 opened 7 years ago

criles25 commented 7 years ago

My team is using angular-faye, and we have ran into an issue where we periodically get [$rootScope:inprog] $digest already in progress. The stack trace shows angular-faye calling $apply, which causes an error when another $digest or $apply is in progress.

If we use $timeout instead, it will safely trigger a $digest cycle.