Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #24824

Closed (moved)
(moved)
Open
Created Jan 08, 2018 by Karsten Loesing@karsten

Either sleep() or wait() in a synchronized block

While looking into #24792 (moved), I found that we're calling this.wait() here without being in a synchronized method or block. That gets us a IllegalMonitorStateException. The only reason why we never ran into one of those (or never noticed?) is that most clients first open /collector.html which triggers an index.json file download in the background before opening actual directory listing pages.

We should fix this. Two options: use Thread.sleep() instead of this.wait(), or wrap this.wait() inside synchronized possibly even combined with this.notifyAll(). I'd say let's do the latter. I'm attaching a quickly tested branch in a second.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking