sender: support elegant stop
Merge pull request #1718 from yichengq/226

sender: support elegant stop