Michelle Bu 12 ani în urmă
părinte
comite
d0304f2082
1 a modificat fișierele cu 5 adăugiri și 0 ștergeri
  1. 5 0
      lib/connection.js

+ 5 - 0
lib/connection.js

@@ -50,6 +50,7 @@ function DataConnection(options, socket, cb) {
       self._maybeBrowserisms();
 
     }, function(err) {
+      this._cb('failed to setRemoteDescription');
       util.log('failed to setRemoteDescription with offer, ', err);
     });
   }
@@ -80,6 +81,7 @@ DataConnection.prototype.handleAnswer = function(message) {
     }
     util.log('ORIGINATOR: PeerConnection success');
   }, function(err) {
+    this._cb('failed to setRemoteDescription');
     util.log('failed to setRemoteDescription, ', err);
   });
 };
@@ -235,9 +237,11 @@ DataConnection.prototype._makeAnswer = function() {
         dst: self._peer
       }));
     }, function(err) {
+      self._cb('failed to setLocalDescription');
       util.log('failed to setLocalDescription, ', err)
     });
   }, function(err) {
+    self._cb('failed to create answer');
     util.log('failed to create answer, ', err)
   });
 };
@@ -258,6 +262,7 @@ DataConnection.prototype._makeOffer = function() {
         metadata: self._metadata
       }));
     }, function(err) {
+      self._cb('failed to setLocalDescription');
       util.log('failed to setLocalDescription, ', err);
     });
   });