Title: Already buffered data when creating a TLSSocket doesn't trigger/throw 'error' · Issue #1114 · nodejs/node · GitHub
Open Graph Title: Already buffered data when creating a TLSSocket doesn't trigger/throw 'error' · Issue #1114 · nodejs/node
X Title: Already buffered data when creating a TLSSocket doesn't trigger/throw 'error' · Issue #1114 · nodejs/node
Description: Brought over from nodejs/node-v0.x-archive#9355 If you pass a socket with already buffered data to TLSSocket and there's an error like: [Error: 139745410942944:error:1408A0C1:SSL routines:SSL3_GET_CLIENT_HELLO:no shared cipher:s3_srvr.c:...
Open Graph Description: Brought over from nodejs/node-v0.x-archive#9355 If you pass a socket with already buffered data to TLSSocket and there's an error like: [Error: 139745410942944:error:1408A0C1:SSL routines:SSL3_GET_...
X Description: Brought over from nodejs/node-v0.x-archive#9355 If you pass a socket with already buffered data to TLSSocket and there's an error like: [Error: 139745410942944:error:1408A0C1:SSL routines:SSL3_...
Opengraph URL: https://github.com/nodejs/node/issues/1114
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Already buffered data when creating a TLSSocket doesn't trigger/throw 'error'","articleBody":"Brought over from https://github.com/joyent/node/issues/9355\n\nIf you pass a socket with already buffered data to TLSSocket and there's an error like:\n\n```\n[Error: 139745410942944:error:1408A0C1:SSL routines:SSL3_GET_CLIENT_HELLO:no shared cipher:s3_srvr.c:1352]\n```\n\nIt will fire as a `_tlsError` immediately while in the constructor instead of either throwing an error (if there were no error handlers) or waiting till the next tick to fire the `_tlsError`.\n\nThis can be solved by wrapping `this._init(socket)` in a `process.nextTick` or delaying:\n\n```\n // Socket already has some buffered data - emulate receiving it\n if (socket \u0026\u0026 socket._readableState.length) {\n var buf;\n while ((buf = socket.read()) !== null)\n this.ssl.receive(buf);\n }\n```\n\nIt seems like the second option (delaying the initial buffer read) is better but let me know what you guys think.\n","author":{"url":"https://github.com/jameshartig","@type":"Person","name":"jameshartig"},"datePublished":"2015-03-10T07:29:09.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/1114/node/issues/1114"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:5f92a6b5-0fdd-13a1-e94f-42f7e6de92b3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E8B0:16195D:67DE8A4:915234E:6A502E40 |
| html-safe-nonce | 8d377d5b7916833cc000b32ba05dc5d33db357543abe0790f7c2fbf432780b5f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOEIwOjE2MTk1RDo2N0RFOEE0OjkxNTIzNEU6NkE1MDJFNDAiLCJ2aXNpdG9yX2lkIjoiMzY1Mjc0OTY3Mjc2MDQ4NzQ4OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 09693ce7d9a22ac71994b694782e4e76a6d442b6f51402c47c2e1f0419918f9a |
| hovercard-subject-tag | issue:60460867 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/1114/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8abde15e5ce43bcf6a7daa4cbc2a99a7bb6f2170e0958aa58ed84e2a4f351fd7/nodejs/node/issues/1114 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8abde15e5ce43bcf6a7daa4cbc2a99a7bb6f2170e0958aa58ed84e2a4f351fd7/nodejs/node/issues/1114 |
| og:image:alt | Brought over from nodejs/node-v0.x-archive#9355 If you pass a socket with already buffered data to TLSSocket and there's an error like: [Error: 139745410942944:error:1408A0C1:SSL routines:SSL3_GET_... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jameshartig |
| hostname | github.com |
| expected-hostname | github.com |
| None | d6dc8294eb500fa36bbc57472d61fe87c522f9c3c1d64f70f4926f66a66a7efb |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d90666eaf032b7eb8975a378efe38e37f4ebb96c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width