Transport is being terminated. We no longer need to do keepalives.
969378
public synchronized void onTransportTermination() {
    if (state != State.DISCONNECTED) {
      state = State.DISCONNECTED;
      if (shutdownFuture != null) {
        shutdownFuture.cancel(false);
      }
      if (pingFuture != null) {
        pingFuture.cancel(false);
        pingFuture = null;
      }
    }
  }
575904
function endTraversal() {
        var pane = _getPane(ACTIVE_PANE);

        if (_traversingFileList) {
            _traversingFileList = false;

            _makeFileMostRecent(pane.id, pane.getCurrentlyViewedFile());
        }
    }
63715
def exit(self):
        
        self.pubsub.unsubscribe()
        self.client.connection_pool.disconnect()

        logger.info("Connection to Redis closed")
394625
private synchronized void cleanupThread ( long timeout ) throws TransportException {
        Thread t = this.thread;
        if ( t != null && Thread.currentThread() != t ) {
            this.thread = null;
            try {
                log.debug("Interrupting transport thread");
                t.interrupt();
                log.debug("Joining transport thread");
                t.join(timeout);
                log.debug("Joined transport thread");
            }
            catch ( InterruptedException e ) {
                throw new TransportException("Failed to join transport thread", e);
            }
        }
        else if ( t != null ) {
            this.thread = null;
        }
    }
1284608
def terminate(self):
    """"""
    # Tear down the Pailgun TCPServer.
    if self.pailgun:
      self.pailgun.server_close()

    super(PailgunService, self).terminate()
454686
function onClose (ctx, err, val, cb) {
  // no callback no queue processing
  if (!_.isFunction(cb)) {
    ctx._heavy.stop();
    ctx._transport.close();
    if (err) {
      ctx.log.fatal(err);
      ctx.emit('error', err);
    }
    return;
  }

  // unsubscribe all active subscriptions
  ctx.removeAll();

  // wait until the client has flush all messages to nats
  ctx._transport.flush(() => {
    ctx._heavy.stop();
    // close NATS
    ctx._transport.close();

    if (err) {
      ctx.log.error(err);
      ctx.emit('error', err);
      if (_.isFunction(cb)) {
        cb(err);
      }
    } else {
      ctx.log.info(Constants.GRACEFULLY_SHUTDOWN);
      if (_.isFunction(cb)) {
        cb(null, val);
      }
    }
  });
}
324301
public void transportClosed() {
        boolean changed=false;

        lock.lock();
        try {
            for(Map.Entry<Address, Rsp<T>> entry: rsps.entrySet()) {
                Rsp<T> rsp=entry.getValue();
                if(rsp != null && !(rsp.wasReceived() || rsp.wasSuspected() || rsp.wasUnreachable())) {
                    rsp.setException(new IllegalStateException("transport was closed"));
                    num_received++;
                    changed=true;
                }
            }
            if(changed && responsesComplete()) {
                complete(this.rsps);
                corrDone();
            }
        }
        finally {
            lock.unlock();
        }
    }
209389
private void maybeTerminateChannel() {
    if (terminated) {
      return;
    }
    if (shutdown.get() && subchannels.isEmpty() && oobChannels.isEmpty()) {
      channelLogger.log(ChannelLogLevel.INFO, "Terminated");
      channelz.removeRootChannel(this);
      terminated = true;
      terminatedLatch.countDown();
      executorPool.returnObject(executor);
      balancerRpcExecutorHolder.release();
      // Release the transport factory so that it can deallocate any resources.
      transportFactory.close();
    }
  }
354318
def close(self):
        """"""
        if self._local.conn:
            self._local.conn.transport.close()
        self._local.conn = None
537644
@Stop(priority = 110)
   public void stop() {
      if (trace) {
         log.tracef("Stopping LocalTopologyManager on %s", transport.getAddress());
      }
      running = false;
      for (LocalCacheStatus cache : runningCaches.values()) {
         cache.getTopologyUpdatesExecutor().shutdownNow();
      }
      withinThreadExecutor.shutdown();
   }
391053
def timeout_keep_alive_handler(self):
        
        if not self.transport.is_closing():
            event = h11.ConnectionClosed()
            self.conn.send(event)
            self.transport.close()
90825
def stop(self, handle, reason=None):
        """"""
        params = self._get_params(reason=reason)
        self._transport.stop(handle, params)
10118
@Override
	protected void onConnectionClose()
    {
    	super.onConnectionClose();
    	
    	try
        {
        	if (transport != null && !transport.isClosed())
        	{
	            log.debug("#"+id+" Closing transport");
	            this.transport.close();
        	}
        }
        catch (Exception e)
        {
            log.error("Could not close transport",e);
        }
    }
372689
def cleanup(self):
        
        if self.transport:
            self.transport.close()
            self.transport = None
        if self.task:
            self.task.cancel()
            self.task = None
952526
def stop(self):
        
        temp_archive = self.sdk.stop_archive(self.id)
        for k,v in iteritems(temp_archive.attrs()):
            setattr(self, k, v)
436553
private void transportClosed(ServerTransport transport) {
    synchronized (lock) {
      if (!transports.remove(transport)) {
        throw new AssertionError("Transport already removed");
      }
      channelz.removeServerSocket(ServerImpl.this, transport);
      checkForTermination();
    }
  }
1263795
def close(self):
        """"""
        if self._closing or self._handle.closed:
            return
        elif self._protocol is None:
            raise TransportError('transport not started')
        # If the write buffer is empty, close now. Otherwise defer to
        # _on_write_complete that will close when the buffer is empty.
        if self._write_buffer_size == 0:
            self._handle.close(self._on_close_complete)
            assert self._handle.closed
        else:
            self._closing = True