     }
 
     public function stop():Boolean {
+      dispatchEvent(new ClientEvent(ClientEvent.STOPPED, { currentTime: this.getCurrentTime() }));
+      this.ns.dispose();
       bcTimer.stop();
-      sendTeardownReq();
+
+      try {
+        sendTeardownReq();
+      } catch (e:*) {}
+
+      this.handle.disconnect();
+
       nc.removeEventListener(AsyncErrorEvent.ASYNC_ERROR, onAsyncError);
       nc.removeEventListener(IOErrorEvent.IO_ERROR, onIOError);
       nc.removeEventListener(NetStatusEvent.NET_STATUS, onNetStatusError);
       nc.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, onSecurityError);
+
       return true;
     }
 

        "Session: " + session + "\r\n" +
        auth.authorizationHeader("TEARDOWN", authState, authOpts, urlParsed, digestNC++) +
        "\r\n";
      try {
        handle.writeUTFBytes(req);
        Logger.log('RTSP OUT:', req);
      } catch (error:*) {
        // If we got an IO error trying to tear down the stream, dispatch
        // STOPPED to let listeners know the stream is stopped.
        dispatchEvent(new ClientEvent(ClientEvent.STOPPED, { currentTime: this.getCurrentTime() }));
        this.ns.dispose();
      }

      prevMethod = sendTeardownReq;
    }


      case STATE_TEARDOWN:
        Logger.log('RTSPClient: STATE_TEARDOWN');
        break;
      }

