Fixed an issue where the disconnect from the server was causing the publish() to fail without resetting file descriptor... which made it impossible to detect connection issues encountered during publish. Also updated the recv() to handle the socket error status as well.