better to stop receiving before stopping send.
Merge pull request #1 from gregoryyoung/master

better to stop receiving before stopping send.