Skip to content

Commit

Permalink
wait a second before freeing the lock
Browse files Browse the repository at this point in the history
  • Loading branch information
matryer committed Mar 10, 2021
1 parent e47a790 commit 9d849c4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,7 @@ func (a *app) handleIncomingURL(url string) {
// wait for a space
a.incomingURLSemaphore <- struct{}{}
defer func() {
time.Sleep(1 * time.Second)
// free up this space
<-a.incomingURLSemaphore
}()
Expand Down

0 comments on commit 9d849c4

Please sign in to comment.