Changed receive thread to request for transmit to stop