Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Promisify reverseDnsLookup #1235

Conversation

metsjeesus
Copy link
Contributor

So you can use the method somewhere else too, maybe on webirc on some extreme cases.

.then(()=>{
init(socket, client);
})
.catch(e=>{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe => should be surrounded with whitespaces. Once #1231 is merged, rebase on master, which I think should detect this :)

@astorije astorije mentioned this pull request Jun 19, 2017
@xPaw xPaw force-pushed the xpaw/safer-auth-flow branch 3 times, most recently from 63a21f1 to c412698 Compare June 21, 2017 07:58
@astorije
Copy link
Member

astorije commented Jul 4, 2017

@metsjeesus, why do you still have xPaw's commit here and in your other PR? Also, are you up-to-date with master?

@metsjeesus
Copy link
Contributor Author

Its only 1 method, reverseDnsLookup. Old code has some auth logic in it, what made it useless to use it anywhere else, example on #986 . Main point is, its cleaner to look and undestand what auth does, its not split up on many places.

@xPaw
Copy link
Member

xPaw commented Jul 10, 2017

I'm gonna agree with @astorije for now. This doesn't provide any direct value. I will take another look at this after session stuff is redone. Login/session code is somewhat critical and subtle issue can easily slip in, so I will close this for now.

Thanks for your help, I'll poke you on IRC on the next release.

@xPaw xPaw closed this Jul 10, 2017
@astorije
Copy link
Member

@metsjeesus, just so you don't take it the wrong way: thanks for your help, we do appreciate it a lot!

Essentially, I believe this PR is doing 2 things: converting async stuff to using promises, and something else. In my understanding, this "something else" is the answer to the underlying problem, not the promisifying, but I'm not sure to understand what is the underlying problem.
Regarding promisifying things, I am for one a big advocate to promises as opposed to callbacks, but in this current case, I don't think they are correctly used here (they are useful when used as values, not functions with no return value + side-effects).

Just like @xPaw said, let's look at this again when the session stuff is ready, there is a lot of crossover right now and it gets confusing and tricky (because of critical component like @xPaw mentioned).

@metsjeesus
Copy link
Contributor Author

metsjeesus commented Jul 12, 2017

@astorije and @xPaw , its all fine. Busy times, many things on the works, understandable. Focus is currently on client side anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants