Remove waiting flag after catch an exception.
Merge pull request #46 from HolymarsHsieh/HandleExceptions

Remove waiting flag after catch an exception.