diff options
author | Feross Aboukhadijeh <feross@feross.org> | 2016-04-02 10:17:38 +0300 |
---|---|---|
committer | Feross Aboukhadijeh <feross@feross.org> | 2016-04-02 10:17:38 +0300 |
commit | 54ed29d6baa8b7d06747848a80711f682ec74a82 (patch) | |
tree | a7c596c46253737296b56a4deab68833f572e2ed | |
parent | 3756ae636c242ea9423874cdfeeb608b4ba1a507 (diff) | |
parent | 8d698bd5fcff9b8ff46a0fd08e52c0a2286482ef (diff) |
Merge branch 'master' into dc/modtime
-rw-r--r-- | CONTRIBUTING.md | 64 | ||||
-rw-r--r-- | index.js | 5 | ||||
-rw-r--r-- | lib/peer.js | 4 | ||||
-rw-r--r-- | lib/torrent.js | 1 |
4 files changed, 52 insertions, 22 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6eeafcb..a6899da 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,44 +4,72 @@ Contributions welcome! **Before spending lots of time on something, ask for feedback on your idea first!** -Please search issues and pull requests before adding something new to avoid duplicating efforts and conversations. +Please search issues and pull requests before adding something new to avoid duplicating +efforts and conversations. -This project welcomes non-code contributions, too! The following types of contributions are welcome: +This project welcomes non-code contributions, too! The following types of contributions +are welcome: - **Ideas**: participate in an issue thread or start your own to have your voice heard. -- **Writing**: contribute your expertise in an area by helping expand the included content. -- **Copy editing**: fix typos, clarify language, and generally improve the quality of the content. -- **Formatting**: help keep content easy to read with consistent formatting. +- **Writing**: contribute your expertise in an area by helping expand the included docs. +- **Copy editing**: fix typos, clarify language, and improve the quality of the docs. +- **Formatting**: help keep docs easy to read with consistent formatting. ## Code Style [![standard][standard-image]][standard-url] -This repository uses [`standard`][standard-url] to maintain code style and consistency, and to avoid style arguments. `npm test` runs `standard` automatically, so you don't have to! +This repository uses [`standard`][standard-url] to maintain code style and consistency, +and to avoid style arguments. `npm test` runs `standard` automatically, so you don't have +to! [standard-image]: https://cdn.rawgit.com/feross/standard/master/badge.svg [standard-url]: https://github.com/feross/standard -# Project Governance +## Project Governance -**This is an [OPEN Open Source Project](http://openopensource.org/).** +Individuals making significant and valuable contributions are given commit-access to the +project to contribute as they see fit. This project is more like an open wiki than a +standard guarded open source project. -Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. - -## Rules +### Rules There are a few basic ground-rules for contributors: 1. **No `--force` pushes** or modifying the Git history in any way. -1. **Non-master branches** ought to be used for ongoing work. -1. **External API changes and significant modifications** ought to be subject to an **internal pull-request** to solicit feedback from other contributors. -1. Internal pull-requests to solicit feedback are *encouraged* for any other non-trivial contribution but left to the discretion of the contributor. -1. Contributors should attempt to adhere to the prevailing code style. +2. **Non-master branches** should be used for ongoing work. +3. **Significant modifications** like API changes should be subject to a **pull request** + to solicit feedback from other contributors. +4. **Pull requests** are *encouraged* for all contributions to solicit feedback, but left to + the discretion of the contributor. -## Releases +### Releases Declaring formal releases remains the prerogative of the project maintainer. -## Changes to this arrangement +### Changes to this arrangement + +This is an experiment and feedback is welcome! This document may also be subject to pull- +requests or changes by contributors where you believe you have something valuable to add +or change. + +## Developer's Certificate of Origin 1.1 + +By making a contribution to this project, I certify that: + +- (a) The contribution was created in whole or in part by me and I have the right to + submit it under the open source license indicated in the file; or + +- (b) The contribution is based upon previous work that, to the best of my knowledge, is + covered under an appropriate open source license and I have the right under that license + to submit that work with modifications, whether created in whole or in part by me, under + the same open source license (unless I am permitted to submit under a different + license), as indicated in the file; or + +- (c) The contribution was provided directly to me by some other person who certified + (a), (b) or (c) and I have not modified it. -This is an experiment and feedback is welcome! This document may also be subject to pull-requests or changes by contributors where you believe you have something valuable to add or change. +- (d) I understand and agree that this project and the contribution are public and that a + record of the contribution (including all personal information I submit with it, + including my sign-off) is maintained indefinitely and may be redistributed consistent + with this project or the open source license(s) involved. @@ -54,7 +54,6 @@ function WebTorrent (opts) { EventEmitter.call(self) if (!opts) opts = {} - if (!debug.enabled) self.setMaxListeners(0) self.destroyed = false self.torrentPort = opts.torrentPort || 0 @@ -87,6 +86,10 @@ function WebTorrent (opts) { self.emit('error', err) self.destroy() }) + + // Ignore warning when there are > 10 torrents in the client + self.dht.setMaxListeners(0) + self.dht.listen(opts.dhtPort) } else { self.dht = false diff --git a/lib/peer.js b/lib/peer.js index aafbabe..06786c5 100644 --- a/lib/peer.js +++ b/lib/peer.js @@ -4,8 +4,8 @@ var Wire = require('bittorrent-protocol') var WebConn = require('./webconn') -var CONNECT_TIMEOUT_TCP = 25000 -var CONNECT_TIMEOUT_WEBRTC = 5000 +var CONNECT_TIMEOUT_TCP = 5000 +var CONNECT_TIMEOUT_WEBRTC = 25000 var HANDSHAKE_TIMEOUT = 25000 /** diff --git a/lib/torrent.js b/lib/torrent.js index 475b41f..8bcb2bc 100644 --- a/lib/torrent.js +++ b/lib/torrent.js @@ -60,7 +60,6 @@ inherits(Torrent, EventEmitter) */ function Torrent (torrentId, client, opts) { EventEmitter.call(this) - if (!debug.enabled) this.setMaxListeners(0) this.client = client this._debugId = this.client.peerId.slice(32) |