eclipse / paho.mqtt.javascript

paho.mqtt.javascript
Other
1.15k stars 467 forks source link

Allow to set event handlers to null #181

Closed pkuczynski closed 5 years ago

pkuczynski commented 5 years ago

Allows to unbind events, for example:

client.onConnectionLost = null
pkuczynski commented 5 years ago

@icraggs what you think?

pkuczynski commented 5 years ago

@icraggs ?

icraggs commented 5 years ago

Hi Piotr. I'm not that familiar with the JavaScript library at the moment, and I'm focussing on the Java library to get a release out, so I'll do my best to handle things. The changes look ok, tho I haven't been able to try them out yet.

1) The Eclipse IP checks didn't run or have failed, and I can't check which right now, which is annoying. Have you signed the Eclipse ECA? (https://www.eclipse.org/legal/ECA.php) ? I checked, but it didn't find anything with your email address. 3) The other criterion for commits is that they have to be signed off (see https://wiki.eclipse.org/Development_Resources/Contributing_via_Git#Signing_off_on_a_commit) 4) Could you submit future PRs to the develop branch rather than master. I usually update the develop branch with work in progress, so that makes it easier for me. I can always merge PRs into a branch other than the one they are submitted on, it's just a bit more complicated.

If you have any questions, let me know.

Thanks!

pkuczynski commented 5 years ago
  1. OMG this is crazy :) First time I had to go through such effort to submit PR. But now it's done.
  2. Done the PR from Github which does not sign commits. Pure laziness. Will push another commit to this branch which is signed
  3. Rebased on develop
pkuczynski commented 5 years ago

@icraggs anything else missing?

icraggs commented 5 years ago

Thanks Piotr. I seem to have more push back from the JavaScript community on the PR requirements than for other languages. I thought that may have something to do with how the JavaScript community works, but I note that the JavaScript Foundation has a CLA too, so I don't know.

Anyway, there is one more thing :-) You have GPG signed your commits which Eclipse projects don't require but is nice :-). However Eclipse projects require non-committers to sign off each commit with the git commit --signoff option.

Non-committers must sign-off the commit, indicating that they aware of the terms by which the contribution has been provided to the project, using the same email address as used in the author field

I read some history yesterday which blamed SCO and their Linux lawsuit for that. The Git doc says:

-s, --signoff Add Signed-off-by line by the committer at the end of the commit log message. The meaning of a signoff depends on the project, but it typically certifies that committer has the rights to submit this work under the same license and agrees to a Developer Certificate of Origin (see http://developercertificate.org/ for more information).

With that we should be done! :-)