Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Apr 22, 2019

The function 'isConnected' is directly called by many 'Socket' instance functions, so we shouldn't directly use 'this' because 'this' will be the self of function itself, and we should use 'self' as the instance of 'Socket' function.


  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added the dgram Issues and PRs related to the dgram subsystem / UDP. label Apr 22, 2019
@mscdex
Copy link
Contributor

mscdex commented Apr 22, 2019

The subsystem in the commit message should be dgram instead of the more general lib.

The function 'isConnected' is directly called by many 'Socket' instance,
so we shouldn't directly use 'this' because 'this' will be the self of
function itself, and we should use 'self' as the instance of 'Socket'
function.
@ghost ghost changed the title lib: change 'this' to 'self' for 'isConnected' dgram: change 'this' to 'self' for 'isConnected' Apr 22, 2019
@nodejs-github-bot

This comment has been minimized.

@ghost

This comment has been minimized.

@BridgeAR

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@ghost

This comment has been minimized.

@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented Apr 22, 2019

@BridgeAR

This comment has been minimized.

@ghost

This comment has been minimized.

@joyeecheung
Copy link
Member

@ZYSzys ZYSzys added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Apr 22, 2019
@Trott
Copy link
Member

Trott commented Apr 24, 2019

Landed in 1a54d0f

@Trott Trott closed this Apr 24, 2019
Trott pushed a commit to Trott/io.js that referenced this pull request Apr 24, 2019
The function 'isConnected' is directly called by many 'Socket' instance,
so we shouldn't directly use 'this' because 'this' will be the self of
function itself, and we should use 'self' as the instance of 'Socket'
function.

PR-URL: nodejs#27338
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
@ghost ghost deleted the BugFix branch April 24, 2019 23:35
@ghost
Copy link
Author

ghost commented Apr 25, 2019

Thanks all!

targos pushed a commit that referenced this pull request Apr 27, 2019
The function 'isConnected' is directly called by many 'Socket' instance,
so we shouldn't directly use 'this' because 'this' will be the self of
function itself, and we should use 'self' as the instance of 'Socket'
function.

PR-URL: #27338
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
@targos targos mentioned this pull request Apr 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. dgram Issues and PRs related to the dgram subsystem / UDP.

Projects

None yet

Development

Successfully merging this pull request may close these issues.