Added queue empty checking and loop.
Merge branch 'master' of github.com:tomviner/p2pchat