Skip to content

Commit 9a1760a

Browse files
authored
Emit busy event after stream is added (#127)
* emit busy event after stream is added * Update socket.js
1 parent 08e6a33 commit 9a1760a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/socket.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ module.exports = class UDXSocket extends events.EventEmitter {
9494
}
9595

9696
_addStream (stream) {
97-
if (this.idle) this._onbusy()
98-
9997
this.streams.add(stream)
98+
99+
if (this.streams.size === 1) this._onbusy()
100100
}
101101

102102
_removeStream (stream) {

0 commit comments

Comments
 (0)