             for source in stream.sources
                 if source._shouldHandoff
                     do (source) =>
-                        meta =
-
                         rpc.request "stream_source",
                             stream:     stream.key
                             type:       source.HANDOFF_TYPE

    sendHandoffData: (rpc,cb) ->
        streams_sent = {}

        fFunc = _.after Object.keys(@streams).length, =>
            @log.info "Rewind buffers and sources sent."
            cb null

        rpc.on "rewind_buffer", (msg,handle,cb) =>
            @log.info "Rewind buffer requested for #{ msg.key }"
            stream = @streams[msg.key]


            stream = @streams[ msg.stream ]
            source = new (require "../sources/#{msg.type}") _.extend {}, msg.opts, sock:handle, logger:stream.log
            stream.addSource source
            @log.info "Added stream source: #{stream.key}/#{source.uuid}"

        rpc.on "group_source", (msg,handle,cb) =>
            sg = @stream_groups[ msg.group ]
            source = new (require "../sources/#{msg.type}") _.extend {}, msg.opts, sock:handle, logger:stream.log
            sg._stream.addSource source
            @log.info "Added group source: #{stream.key}/#{source.uuid}"

        af = _.after (Object.keys(@streams).length+Object.keys(@stream_groups).length), =>
            cb null

        for key,group of @stream_groups
            do (key,group) =>
                # we don't need rewind buffers for stream groups, but we do
                # need sources.
                rpc.request "group_sources", key:key, (err) =>
                    @log.error "Error getting StreamGroup sources: #{err}" if err
                    @log.info "Sources received for StreamGroup #{ key }."
                    af()

        for key,stream of @streams
            do (key,stream) =>
