Unpauses the stream.
321607
def unpause(self):
        """"""
        res = librtmp.RTMP_Pause(self.client.rtmp, 0)

        if res < 1:
            raise RTMPError("Failed to unpause")
730647
void stopIfNecessary() {
    synchronized (lock) {
      if (goAway && !stopped && streams.size() == 0) {
        stopped = true;
      } else {
        return;
      }
    }
    listener.transportTerminated();
  }
1188858
def _on_stream_disconnect(self, stream):
        
        # During a stream crash it is possible for disconnect signal to fire
        # twice, in which case ignore the second instance.
        routes = self._routes_by_stream.pop(stream, None)
        if routes is None:
            return

        LOG.debug('%r: %r is gone; propagating DEL_ROUTE for %r',
                  self, stream, routes)
        for target_id in routes:
            self.router.del_route(target_id)
            self._propagate_up(mitogen.core.DEL_ROUTE, target_id)
            self._propagate_down(mitogen.core.DEL_ROUTE, target_id)

            context = self.router.context_by_id(target_id, create=False)
            if context:
                mitogen.core.fire(context, 'disconnect')
1036437
void cleanup(Http2Stream stream, EmbeddedChannel compressor) {
        if (compressor.finish()) {
            for (;;) {
                final ByteBuf buf = compressor.readOutbound();
                if (buf == null) {
                    break;
                }

                buf.release();
            }
        }
        stream.removeProperty(propertyKey);
    }
570175
function (inputStream, outputStream, tempPath, tempPath2, err, callback) {
      async.parallel({
        unlink: function(cb) {
          if (!tempPath) {
            return callback(null);
          }
          removeLocalBlob(tempPath, cb);
        },

        unlink2: function(cb) {
          if (!tempPath2) {
            return callback(null);
          }
          removeLocalBlob(tempPath2, cb);
        },

        closeReadStream: function(cb) {
          inputStream.destroy();
          cb();
        },

        closeWriteStream: function(cb) {
          outputStream.destroy();
          cb();
        }
      }, cleanupError => {
        if (err) {
          return callback(err);
        }
        return callback(cleanupError);
      });
    }
102665
def on_disconnect(self):
        ""
        if self._stream is not None:
            self._stream = None
        if self._buffer is not None:
            self._buffer.close()
            self._buffer = None
        self.encoding = None
745416
public function disconnect()
    {
        try {
            if ($this->stream) {
                $this->stream->close();
                $this->stream = null;
            }
        } catch (\Throwable $e) {
            \danog\MadelineProto\Logger::log('Got exception while closing stream: '.$e->getMessage());
        } catch (\Exception $e) {
            \danog\MadelineProto\Logger::log('Got exception while closing stream: '.$e->getMessage());
        }
    }
1255170
void free(ClientSocket stream)
  {
    success();

    _activeCount.decrementAndGet();

    synchronized (this) {
      int size = (_idleHead - _idleTail + _idle.length) % _idle.length;

      if (_state != State.CLOSED && size < _idleSize) {
        _idleHead = (_idleHead + 1) % _idle.length;
        _idle[_idleHead] = stream;

        stream = null;
      }

      long now = CurrentTime.currentTime();

      long prevSuccessTime = _prevSuccessTime;

      if (prevSuccessTime > 0) {
        _latencyFactor = (0.95 * _latencyFactor
                          + 0.05 * (now - prevSuccessTime));
      }

      if (_activeCount.get() > 0)
        _prevSuccessTime = now;
      else
        _prevSuccessTime = 0;

      _lastSuccessTime = now;
      
      if (log.isLoggable(Level.FINEST)) { 
        logFinest(L.l("free: _lastSuccessTime={0}, _failTime={1}",
                      now, _failTime));
      }
    }

    updateWarmup();

    long now = CurrentTime.currentTime();
    long maxIdleTime = _loadBalanceIdleTime;
    ClientSocket oldStream = null;

    do {
      oldStream = null;

      synchronized (this) {
        if (_idleHead != _idleTail) {
          int nextTail = (_idleTail + 1) % _idle.length;

          oldStream = _idle[nextTail];

          if (oldStream != null
              && oldStream.getIdleStartTime() + maxIdleTime < now) {
            _idle[nextTail] = null;
            _idleTail = nextTail;
          }
          else
            oldStream = null;
        }
      }

      if (oldStream != null)
        oldStream.closeImpl();
    } while (oldStream != null);

    if (stream != null) {
      stream.closeImpl();
    }
  }
195043
public void cancel() {
        try {
            // FileOutputStream is also closed cascadingly
            if (outStream != null) {
                outStream.close();
                outStream = null;
            }
            // Clear encryptor:
            encryptor = null;
        } catch (IOException e) {
            Log.w(Log.TAG_BLOB_STORE, "Exception closing buffered output stream", e);
        }
        tempFile.delete();
    }
105097
function destroyReadStream (stream) {
  stream.destroy()

  if (typeof stream.close === 'function') {
    // node.js core bug work-around
    stream.on('open', onOpenClose)
  }

  return stream
}
898120
public function detachContentStream()
    {
        $this->contentStream = null;
        $this->partStreamFilterManager->setStream(null);
        $this->onChange();
    }
413591
function cleanStream() {
	var logStream = this.logstream;
	this.logstream = this.cleanStream = null;

	this.log = null;
	this.logname = null;
	this._logname = null;

	// wait a little bit to let other end events process before closing the stream
	logStream && setTimeout(logStream.end.bind(logStream), 500);
}
211119
def close_stream(self):
		
		self.keep_listening = False
		self.stream.stop()
		self.stream.close()
565257
def reset_stream(stream):
    
    try:
        position = stream.tell()
    except Exception:
        position = True
    if position != 0:
        try:
            stream.seek(0)
        except Exception:
            message = 'It\'s not possible to reset this stream'
            raise exceptions.TabulatorException(message)
540914
public void dispose ()
    {
        // make sure the stream is stopped
        if (_state != AL10.AL_STOPPED) {
            stop();
        }

        // delete the source and buffers
        _source.delete();
        for (Buffer buffer : _buffers) {
            buffer.delete();
        }

        // remove from manager
        _soundmgr.removeStream(this);
    }
149638
public function closeTermsStream()
    {
        while (($termStream = $this->_termsStreamQueue->pop()) !== null) {
            $termStream->closeTermsStream();
        }

        $this->_termsStreamQueue = null;
        $this->_lastTerm         = null;
    }
854180
async function erase(ws) {
    await unlink(ws.path)
    if (ws.writable) {
        await endStream(ws)
    }
    return ws
}