Catch ETIMEDOUT from write().