fn stream_closed_close_all(&mut self, error: ProtoError) {
        if !self.active_requests.is_empty() {
            warn!("stream {} error: {}", self.stream, error);
        } else {
            debug!("stream {} error: {}", self.stream, error);
        }

        for (_, active_request) in self.active_requests.drain() {
            if active_request.responses.is_empty() {
                // complete the request, it's failed...
                active_request.complete_with_error(error.clone());
            } else {
                // this is a timeout waiting for multiple responses...
                active_request.complete();
            }
        }
    }
/// Closes all outstanding completes with a closed stream error
Closes all outstanding completes with a closed stream error
Closes all outstanding completes with a closed stream error
fn stream_closed_close_all(&mut self, error: ProtoError) {
        if !self.active_requests.is_empty() {
            warn!("stream {} error: {}", self.stream, error);
        } else {
            debug!("stream {} error: {}", self.stream, error);
        }
        for (_, active_request) in self.active_requests.drain() {
            if active_request.responses.is_empty() {
                // complete the request, it's failed...
                active_request.complete_with_error(error.clone());
            } else {
                // this is a timeout waiting for multiple responses...
                active_request.complete();
            }
        }
    }
fn stream_closed_close_all ( & mut self , error : ProtoError ) { if ! self . active_requests . is_empty ( ) { warn ! ( " " self stream error ) ; } else { debug ! ( " " self stream error ) ; } for ( _ , active_request ) in self . active_requests . drain ( ) { if active_request . responses . is_empty ( ) { // complete the request, it's failed... active_request . complete_with_error ( error . clone ( ) ) ; } else { // this is a timeout waiting for multiple responses... active_request . complete ( ) ; } } }
Closes all outstanding completes with a closed stream error
Closes all outstanding completes with a closed stream error
&mut self
error
ProtoError
&mut self
error
ProtoError