When a network request is cancelled we stop tracking it and do not send the information through.
Future updates may include sending the cancelled request timing through with information showing it was cancelled.
173880
public static synchronized void cancelNetworkCall(String url, String requestMethod, long endTime, String exception) {
    if (url != null) {
      String id = sanitiseURL(url);
      if ((connections != null) && (connections.containsKey(id))) {
        connections.remove(id);
      }
    }
  }
928393
def connection_lost(self, exc):
        """"""
        _LOGGER.debug('Connection lost with %s', self.transport)
        if self.gateway.cancel_check_conn:
            self.gateway.cancel_check_conn()
            self.gateway.cancel_check_conn = None
        if exc:
            _LOGGER.error(exc)
            self.conn_lost_callback()
        self.transport = None
957560
public void stop() {
        final boolean trace = TraceComponent.isAnyTracingEnabled();

        // Stop accepting work
        stopped = true;

        // Cancel futures for submitted work
        for (Future<Void> future = futures.poll(); future != null; future = futures.poll())
            if (!future.isDone() && future.cancel(true))
                if (trace && tc.isDebugEnabled())
                    Tr.debug(this, tc, "canceled", future);

        // Release running work
        for (Work work = runningWork.poll(); work != null; work = runningWork.poll()) {
            if (trace && tc.isDebugEnabled())
                Tr.debug(this, tc, "release", work);
            work.release();
        }
    }
178787
def action_cancel(self):
        """"""
        self.write({'state': 'cancelled'})
        for rec in self:
            rec.message_post(
                subtype='mt_comment',
                body=_(
                    'Change request <b>%s</b> has been cancelled by %s.'
                    ) % (rec.display_name, self.env.user.name)
                )
1154264
private void handleOutstandingOperations(final ChannelHandlerContext ctx) {
        if (sentRequestQueue.isEmpty()) {
            LOGGER.trace(logIdent(ctx, endpoint) + "Not cancelling operations - sent queue is empty.");
            return;
        }

        LOGGER.debug(logIdent(ctx, endpoint) + "Cancelling " + sentRequestQueue.size() + " outstanding requests.");
        while (!sentRequestQueue.isEmpty()) {
            REQUEST req = sentRequestQueue.poll();
            try {
                sideEffectRequestToCancel(req);
                failSafe(env().scheduler(), moveResponseOut, req.observable(),
                        new RequestCancelledException("Request cancelled in-flight."));
            } catch (Exception ex) {
                LOGGER.info(
                    "Exception thrown while cancelling outstanding operation: {}",
                    user(req.toString()),
                    ex
                );
            }
        }

        sentRequestTimings.clear();
    }
608404
void removeDownload(OfflineDownloadOptions offlineDownload, boolean canceled) {
    if (canceled) {
      stateChangeDispatcher.onCancel(offlineDownload);
    } else {
      stateChangeDispatcher.onSuccess(offlineDownload);
    }
    offlineDownloads.remove(offlineDownload);
  }
913030
private void failRequests() {
    final Set<OngoingRequest> requests = ImmutableSet.copyOf(outstanding);
    for (OngoingRequest id : requests) {
      final boolean removed = outstanding.remove(id);
      if (removed) {
        id.reply(Response.forStatus(Status.SERVICE_UNAVAILABLE));
      }
    }
  }
596046
def stop_capture(self):
        

        self._capturing = False
        self._project.controller.notification.emit("link.updated", self.__json__())
836158
public boolean isRequestComplete() {
        PooledByteBuffer[] data = getAttachment(BUFFERED_REQUEST_DATA);
        if(data != null) {
            return false;
        }
        return allAreSet(state, FLAG_REQUEST_TERMINATED);
    }
1195504
void cancel(AsyncChannelFuture future, Exception reason) throws ClosedChannelException, IOException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "cancel");
        }
        if (!isOpen()) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Cancel request on closed connection");
            }
            future.setCancelInProgress(0);
            throw new ClosedChannelException();
        }

        // Cannot cancel a completed call.
        if (future.isCompleted()) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Cancel request on completed future");
            }
            future.setCancelInProgress(0);
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
                Tr.exit(tc, "cancel");
            }
            return;
        }

        long callid;
        if (((AsyncFuture) future).isRead()) {
            callid = this.readIOCB.getCallIdentifier();
        } else {
            callid = this.writeIOCB.getCallIdentifier();
        }

        int rc = provider.cancel2(this.channelIdentifier, callid);
        if (rc == 0) {
            // Mark the future completed with an Exception
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Cancel Successful, resetting CancelInProgress state to 0");
            }
            future.setCancelInProgress(0);
            future.completed(reason);
        } else {
            // could not cancel
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Cancel could not be completed");
            }
            future.setCancelInProgress(0);
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "cancel");
        }
    }
196063
def connection_lost(self, exc):
        """"""
        _LOGGER.debug('Connection lost with %s', self.transport.serial)
        if exc:
            _LOGGER.error(exc)
            self.transport.serial.close()
            self.conn_lost_callback()
        self.transport = None
985312
@Override
	public void stopped() {

		// Stop heartbeat timer
		if (heartBeatTimer != null) {
			heartBeatTimer.cancel(false);
			heartBeatTimer = null;
		}

		// Stop timeout checker's timer
		if (checkTimeoutTimer != null) {
			checkTimeoutTimer.cancel(false);
			checkTimeoutTimer = null;
		}

		// Send "disconnected" packet
		sendDisconnectPacket();

		// Clear all stored data
		nodes.clear();
	}
879485
def _sent_without_response(self, send_time_before):
        """"""
        return not self._messages and self._send_time and self._send_time < send_time_before
1083614
private void handleUnready(String address) {
    log.debug(String.format("%s - Received unready message from: %s", NetworkManager.this, address));
    ready.remove(address);
    checkUnready();
  }
315806
def on_consumer_cancelled(self, _frame):
        
        self.logger.debug('Consumer has been cancelled')
        if self.is_shutting_down:
            self.channel.close()
        else:
            self.set_state(self.STATE_CONNECTED)
275157
def connectionLost(self, reason):
        
        AMP.connectionLost(self, reason)
        if self.logout is not None:
            self.logout()
            self.boxReceiver = self.logout = None
1292262
def cancel(self):
        
        if self.done():
            return False

        self._client.cancel_operation(self._operation.name)
        return True