Merge pull request #2 from 30x/XAPID-818

added shutdownevent for graceful shutdown