Fix Connection.close on 0.10 upwards#246
Open
davedoesdev wants to merge 4 commits intoflatiron:masterfrom
davedoesdev:fix-close
Open
Fix Connection.close on 0.10 upwards#246davedoesdev wants to merge 4 commits intoflatiron:masterfrom davedoesdev:fix-close
davedoesdev wants to merge 4 commits intoflatiron:masterfrom
davedoesdev:fix-close
Conversation
Contributor
|
I like this but it would be cleaner to check if it an object and if it is then make the same array from the keys instead of having a big if / else block |
Contributor
Author
|
@indexzero OK I updated it - is that along the lines you were thinking? |
Contributor
Author
|
Without this fix, I'm still getting: ✗ should be able to close the Connection
TypeError: this.agent.sockets.forEach is not a function
at Connection.cradle.Connection.close (/home/david/cradle/lib/cradle.js:173:24)
at Object.vows.describe.addBatch.Default connection settings.should be able to close the Connection (/home/david/cradle/test/connection-test.js:29:15)
at runTest (/home/david/cradle/node_modules/vows/lib/vows.js:136:26)
at EventEmitter.<anonymous> (/home/david/cradle/node_modules/vows/lib/vows.js:81:9)
at emitOne (events.js:82:20)
at EventEmitter.emit (events.js:169:7)
at EventEmitter.options.Emitter.emit (/home/david/cradle/node_modules/vows/lib/vows.js:241:24)
at /home/david/cradle/node_modules/vows/lib/vows/suite.js:170:45
at nextTickCallbackWith0Args (node.js:415:9)
at process._tickCallback (node.js:344:13) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've left the old behaviour in - did HTTP Agent change at some point?