                     @log?.debug "Lost connection to #{@url}. Retrying in 5 seconds"
                     @connected = false
 
+                    # unpipe everything
+                    @icecast.removeAllListeners()
+
             @icecast.on "metadata", (data) =>
                 unless @_in_disconnect
                     meta = Icecast.parse(data)
-                    console.log "metadata is ", meta
 
                     if meta.StreamTitle
                         @StreamTitle = meta.StreamTitle


            # return with success
            @connected = true

            @emit "connect"

        # outgoing -> Stream
        @on "_chunk", (frame) =>
            @emit "data", chunk

    #----------

    #----------

    info: ->
        source:         @TYPE?() ? @TYPE
        connected:      @connected
        url:            @url
        streamKey:      @streamKey
        uuid:           @uuid
        isFallback:     @isFallback
        last_ts:        @last_ts
        connected_at:   @connected_at


    #----------

    connect: ->
        @log?.debug "connecting to #{@url}"

        url_opts = url.parse @url
        url_opts.headers = "user-agent":"StreamMachine 0.1.0"
