Fix stupid error in previous commit Since ret is no longer update by close_notify(), we need to reset it to 0 after a successful write.