Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

peer-disconnected could be confused for a peer disconnecting rather t…

…han your peer being disconnected from the server.
  • Loading branch information...
commit 5fbdaf0c85eaa9af8c035bf5b8ba77f4abb52739 1 parent 75e8497
Michelle Bu michelle authored
Showing with 4 additions and 4 deletions.
  1. +1 −1  changelog.md
  2. +1 −1  docs/api.md
  3. +2 −2 lib/peer.js
2  changelog.md
View
@@ -1,7 +1,7 @@
# PeerJS Changelog
## Version 0.2.1 (Pending)
-* **Warning**: this build changes the error of type `peer-destroyed` to `peer-disconnected`.
+* **Warning**: this build changes the error of type `peer-destroyed` to `server-disconnected`.
* Browser detection added. If an incompatible browser is detected, the `browser-incompatible` error is emitted from the `Peer`.
* Added a `.disconnect()` method to `Peer`, which can be called to close connections to the PeerServer (but not any active DataConnections).
2  docs/api.md
View
@@ -99,7 +99,7 @@ The `error` object also has a `type` parameter that may be helpful in responding
* `socket-error`: An error from the underlying socket.
* `socket-closed`: The underlying socket closed unexpectedly.
* (The Peer object is destroyed after one of the errors above are emitted.)
-* `peer-disconnected`: A Peer that has been disconnected is being used to try to connect.
+* `server-disconnected`: A Peer that has been disconnected is being used to try to connect.
### Event: 'close'
4 lib/peer.js
View
@@ -234,8 +234,8 @@ Peer.prototype._cleanup = function() {
* is waiting for an ID. */
Peer.prototype.connect = function(peer, options) {
if (this.disconnected) {
- var err = new Error('This Peer has been disconnected from the server and');
- err.type = 'peer-disconnected';
+ var err = new Error('This Peer has been disconnected from the server and can no longer make connections.');
+ err.type = 'server-disconnected';
this.emit('error', err);
return;
}
Please sign in to comment.
Something went wrong with that request. Please try again.