stop using settimeout and setimmediate to trigger available streams.
trigger when we free a stream id instead.