fix for stack overload due to multiple 'offline' events
Merge pull request #79 from shobhitsinghal624/master

fix for stack overload due to multiple 'offline' events