Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

ReadGroups should allow just group output by not sending to OUT unles…

…s attached
  • Loading branch information...
commit a87a99fd3358236d579898048ecb7829708120ba 1 parent 91fcf23
@kenhkan kenhkan authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 components/ReadGroups.coffee
View
8 components/ReadGroups.coffee
@@ -26,7 +26,7 @@ class ReadGroups extends noflo.Component
@inPorts.in.on 'begingroup', (group) =>
beginGroup = =>
@groups.push group
- @outPorts.out.beginGroup group
+ @outPorts.out.beginGroup group if @outPorts.out.isAttached()
# Just forward if we're past the threshold
if @count >= @threshold
@@ -41,13 +41,13 @@ class ReadGroups extends noflo.Component
@inPorts.in.on 'endgroup', (group) =>
if group is _.last @groups
@groups.pop()
- @outPorts.out.endGroup()
+ @outPorts.out.endGroup() if @outPorts.out.isAttached()
@inPorts.in.on 'data', (data) =>
- @outPorts.out.send data
+ @outPorts.out.send data if @outPorts.out.isAttached()
@inPorts.in.on 'disconnect', =>
- @outPorts.out.disconnect()
+ @outPorts.out.disconnect() if @outPorts.out.isAttached()
@outPorts.group.disconnect()
exports.getComponent = -> new ReadGroups
Please sign in to comment.
Something went wrong with that request. Please try again.