Burgestrand / spotify

Low-level Ruby bindings for libspotify, the official Spotify C API
https://rubygems.org/gems/spotify
Other
147 stars 17 forks source link

second login waits for long time (possibly forever) #29

Closed gpinkham closed 10 years ago

gpinkham commented 10 years ago

first let me explain how I'm using the gem (quite possibly I'm doing it all wrong). . I'm writing a rails web application.. I ask the user for name/pass and call the initialize method of the support object (yeah i copied that directly from the examples as it seemed helpful).. after this I fetch the playlists for that user and return it back to the browser.. if I try the login again I would get a segfault.. I realized I hadn't released the session.. so before returning the list of playlists to the browser I would log out the user and release the session.. Now if i call login the second time I get "Log in requested. Waiting forever until logged in......................" and the periods just keep coming and coming.... eventually I kill the server....

Any suggestions, comments or general rants are appreciated! gary

Burgestrand commented 10 years ago

I would log out the user and release the session

Don't release the session. You can only ever create one session in the same process.

Also, please use the mailing list for discussions. :)

gpinkham commented 10 years ago

yeap.. sorry hadn't seen the mailing list at first.. forgot to come back and close this.. thanks..