Skip to content

Commit

Permalink
BMediaRoster: Wait with more calm for services to be up.
Browse files Browse the repository at this point in the history
* Needed to avoid the app restarting things too fast. This
  is a problem that should be solved, added a TODO.
  • Loading branch information
Numerio committed Jul 30, 2015
1 parent 5f01992 commit 1ce097d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/kits/media/MediaRoster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3377,6 +3377,11 @@ BMediaRoster::MessageReceived(BMessage* message)
// Send the notification to our subscribers
if (BMediaRoster::IsRunning()) {
sServerIsUp = true;
// Wait for media services to wake up
// TODO: This should be solved so that the server
// have a way to notify us when the system is really
// ready to run and we avoid sleeping.
snooze(2000000);
// Restore our friendship with the media servers
if (MediaRosterEx(this)->BuildConnections() != B_OK) {
TRACE("BMediaRoster::MessageReceived can't reconnect"
Expand Down

0 comments on commit 1ce097d

Please sign in to comment.