Added additional error handling for crashed sockets
Clear input field after text message is sent