desirepath41 / visualCaptcha-npm

Node.js NPM package for visualCaptcha's backend service
MIT License
17 stars 8 forks source link

Image stream #1

Closed miklacko closed 10 years ago

miklacko commented 10 years ago

Hi this throws error when i refresh site few times in a row... "Can't set headers after they are sent.". When i comment 'close' function it works. if ( stream ) { stream.on( 'end', function() { response.send( 200, 'Ok' ); });

                    stream.on( 'close', function() {
                        response.send( 200, 'Ok' );
                    });

}