
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
pull-inactivity
Advanced tools
Abort a pull-stream (duplex or transform) when the rate of throughput gets too low.
This is useful for a p2p protocol where you must manage multiple connections, aborting connections to unhelpful peers.
var inactivity = require('pull-inactivity')
var pull = require('pull-stream')
//some sort of p2p system, eg, scuttlebot.
var peer = createPeer()
//create a reliable stream to a remote peer
//i.e. tcp, websockets, or webrtc data channel
var stream = connect(remotePeer)
//create the protocol stream, give a min data rate (megabytes/second)
var peerStream = inactivity(peer.createStream(), 0.001, function (err) {
//this cb is triggered when stream is aborted.
console.log('disconnected')
})
pull(stream, peerStream, stream)
if you have a normal source, transform, sink pipeline,
you can use pull-inactivity with that too.
var inactivity = require('pull-inactivity')
var pull = require('pull-stream')
pull(
source,
transform,
inactivity.through(0.01, function (err) {
console.log('stream ended')
}),
sink
)
MIT
FAQs
kill a duplex pull-stream after period of inactivity.
The npm package pull-inactivity receives a total of 495 weekly downloads. As such, pull-inactivity popularity was classified as not popular.
We found that pull-inactivity demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.