smarter selection of a message after deleting a message
use sock.sendall instead of sock.send to fix Ubuntu restart-hang issue
Merge pull request #119 from Atheros1/master

use sock.sendall instead of sock.send to fix Ubuntu restart-hang issue