Changed error handling on failed tcp msg sending.