{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/node/issues/19562","repository_url":"https://api.github.com/repos/nodejs/node","labels_url":"https://api.github.com/repos/nodejs/node/issues/19562/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/node/issues/19562/comments","events_url":"https://api.github.com/repos/nodejs/node/issues/19562/events","html_url":"https://github.com/nodejs/node/issues/19562","id":308134413,"number":19562,"title":"Regression: Wrong value in bytesWritten for net.Socket","user":{"login":"patrickjuchli","id":397839,"avatar_url":"https://avatars2.githubusercontent.com/u/397839?v=4","gravatar_id":"","url":"https://api.github.com/users/patrickjuchli","html_url":"https://github.com/patrickjuchli","followers_url":"https://api.github.com/users/patrickjuchli/followers","following_url":"https://api.github.com/users/patrickjuchli/following{/other_user}","gists_url":"https://api.github.com/users/patrickjuchli/gists{/gist_id}","starred_url":"https://api.github.com/users/patrickjuchli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patrickjuchli/subscriptions","organizations_url":"https://api.github.com/users/patrickjuchli/orgs","repos_url":"https://api.github.com/users/patrickjuchli/repos","events_url":"https://api.github.com/users/patrickjuchli/events{/privacy}","received_events_url":"https://api.github.com/users/patrickjuchli/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-23T18:23:05Z","updated_at":"2018-03-24T03:06:02Z","closed_at":null,"author_association":"NONE","body":"There is a regression since v9.7.0 (Darwin-x64) until and including v9.9.0:\r\n\r\nIf I send data with a net.Socket, the property `bytesWritten` won't reflect the correct number of bytes\r\nwritten, it's always too low. I have verified this on the receiving end – data is written/sent as expected, only `bytesWritten` is incorrect.\r\n\r\nThis works correctly until v9.6.1 (Darwin-x64)."},"comment":{"url":"https://api.github.com/repos/nodejs/node/issues/comments/375842187","html_url":"https://github.com/nodejs/node/issues/19562#issuecomment-375842187","issue_url":"https://api.github.com/repos/nodejs/node/issues/19562","id":375842187,"user":{"login":"gireeshpunathil","id":6447530,"avatar_url":"https://avatars2.githubusercontent.com/u/6447530?v=4","gravatar_id":"","url":"https://api.github.com/users/gireeshpunathil","html_url":"https://github.com/gireeshpunathil","followers_url":"https://api.github.com/users/gireeshpunathil/followers","following_url":"https://api.github.com/users/gireeshpunathil/following{/other_user}","gists_url":"https://api.github.com/users/gireeshpunathil/gists{/gist_id}","starred_url":"https://api.github.com/users/gireeshpunathil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gireeshpunathil/subscriptions","organizations_url":"https://api.github.com/users/gireeshpunathil/orgs","repos_url":"https://api.github.com/users/gireeshpunathil/repos","events_url":"https://api.github.com/users/gireeshpunathil/events{/privacy}","received_events_url":"https://api.github.com/users/gireeshpunathil/received_events","type":"User","site_admin":false},"created_at":"2018-03-24T03:06:02Z","updated_at":"2018-03-24T03:06:02Z","author_association":"MEMBER","body":"Unable to reproduce on mac with this code. Can you review and see where is the difference between our approaches?\r\n\r\n#cat 19562.js\r\n```js\r\nconst n = require('net')\r\nconst v = n.createServer((s) => {\r\n  s.end(Buffer.alloc(process.argv[2] - 0).fill('g'), () => {\r\n    console.log(s.bytesWritten)\r\n  })\r\n}).listen(8124, () => {\r\n  const c = n.connect(8124, () => {})\r\n  c.on('close', () => {v.close()})\r\n})\r\n```\r\n#node 19562.js 1\r\n1\r\n#node 19562.js 32\r\n32\r\n#node 19562.js 128\r\n128\r\n#node 19562.js 512\r\n512\r\n#node 19562.js 1024\r\n1024\r\n#\r\n#node -v\r\nv9.8.0\r\n#\r\n```"}}
{"actor":{"display_login":"gireeshpunathil"}}