           @dumpClients()
         c.buf = null
         c.on 'error', (err) ->
-          console.error "Socket error (#{c.clientID}): #{err}"
+          logger.error "Socket error (#{c.clientID}): #{err}"
           c.destroy()
         c.on 'data', (data) =>
           @handleOnData c, data

      if DEBUG_RTSP
        console.log "==================="
      if resultOpts?.close
        console.log "[#{c.clientID}] end"
        c.end()
      if c.buf?
        # Process the remaining buffer

    if not @socket.remoteAddress?
      return "#{@id}: session=#{@sessionID} (being destroyed)"
    else
      transportDesc = if @clientType? then "type=#{@clientType}" else ''
      if @clientType in ['http-get', 'tcp', 'udp']
        transportDesc += " isPlaying=#{@isPlaying}"
      return "#{@id}: session=#{@sessionID} addr=#{@socket.remoteAddress} port=#{@socket.remotePort} #{transportDesc}"
