diff --git a/lib/socket.js b/lib/socket.js
index <HASH>..<HASH> 100644
--- a/lib/socket.js
+++ b/lib/socket.js
@@ -112,6 +112,11 @@ Socket.prototype.open = function () {
 Socket.prototype.setTransport = function (transport) {
   var self = this;
 
+  if (this.transport) {
+    // debug: clearing existing transport
+    this.transport.removeAllListeners();
+  }
+
   // set up transport
   this.transport = transport;
Sanity check: clear all events from previous transport in setTransport.