if error status is negative, it is considered a critical error and the connection is closed