Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#4 Only disconnect after idle period

closed-accepted
ace jones
None
5
2005-04-15
2005-03-23
Rob Walker
No

I found kionjb was not suitable for uploading many files in
one go as the rapid disconnection and reconnection to the
player between tracks often caused it to get stuck while
connecting. Reading the libnjb FAQ confirms that such
rapid connections won't work. This patch attempts to fix
this by only disconnecting from the player after the
connection has been idle for a period (currently 5s, but
should probably be only 1 or 2 seconds).

It uses the "special" slot in the kio slave which can be
called after a given timeout. Every time connect() is
called, the timer is disabled. When disconnect is called
(with force=false), the timer is set for 5s, but the player
remains connected. It is only disconnected after the
timeout has elapsed or when the kioslave is destroyed.

I've been able to load several hundred megabytes of mp3s
in one go with this patch applied, with no errors.

The patch should be applied to the current CVS after
applying my build fix patch.

Rob

Discussion

  • Rob Walker
    Rob Walker
    2005-03-23

    Only disconnect kionjb after idle period

     
    Attachments
  • ace jones
    ace jones
    2005-03-25

    Logged In: YES
    user_id=954547

    Is this against the -st branch?

     
  • ace jones
    ace jones
    2005-03-25

    • assigned_to: nobody --> acejones
    • status: open --> pending
     
  • Rob Walker
    Rob Walker
    2005-03-25

    Logged In: YES
    user_id=31798

    Yes, it's against the steup branch.

     
  • Rob Walker
    Rob Walker
    2005-03-25

    • status: pending --> open
     
  • ace jones
    ace jones
    2005-04-15

    Logged In: YES
    user_id=954547

    This is now in CVS

     
  • ace jones
    ace jones
    2005-04-15

    • status: open --> closed-accepted