Git Product home page Git Product logo

Comments (9)

wconrad avatar wconrad commented on August 28, 2024

from ftpd.

pcbeard avatar pcbeard commented on August 28, 2024

Even w/o any connections, simply starting the server by running bin/fptdrb, here's what top shows:

PID    COMMAND      %CPU TIME     #TH   COW     #PORT MEM    PURG   CMPRS  STATE    UID  #WQ  BOOSTS                %CPU_ME
17058  ruby         94.2 02:02.52 3/1   237     24    8960K  0B     0B     running  5322 0    *0[1]                 0.00000

from ftpd.

wconrad avatar wconrad commented on August 28, 2024

The problem was a busy-loop in bin/ftpdrb.
I can't release a new gem right now--something in my test/release setup for ftpd has gone wrong, and I can't troubleshoot it right now.

from ftpd.

pcbeard avatar pcbeard commented on August 28, 2024

Yes, I just confirmed that too. Here:

    def run
      puts "FTP server started. (Press CRL+C to stop it)"
      connection_info.each do |key, value|
        puts "#{key}: #{value}"
      end
      $stdout.flush
      begin
        loop{}
      rescue Interrupt
        puts "\nClosing FTP server..."
      end
    end

What's your proposed fix? I think the easiest would be to simply change that loop to a call to the server thread's join method.

from ftpd.

pcbeard avatar pcbeard commented on August 28, 2024

Added a pull request.

from ftpd.

wconrad avatar wconrad commented on August 28, 2024

I think your fix is fine. I'll probably back out my fix and accept your PR after I get some of ftpd's housekeeping taken care of.

from ftpd.

wconrad avatar wconrad commented on August 28, 2024

I've released a new version of the gem which includes my fix for this issue. Leaving this issue open tor remind me to replace it with your fix.

from ftpd.

pcbeard avatar pcbeard commented on August 28, 2024

Did you ever consider my fix?

from ftpd.

wconrad avatar wconrad commented on August 28, 2024

@pcbeard I would love to use your fix. I haven't pulled it in because my upkeep of ftpd stopped when recent versions of Ruby broke the double-bag-ftps gem that ftpd uses for ftps support, and I don't know what the fix for that is. I suppose I could officially not support more recent Ruby versions, but that bothers me.

from ftpd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.