Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rpcserver: use semaphore to limit # of goroutines in SendPayment
This commit fixes a prior oversight in the implementation of SendPayment that could result in tens of thousands of goroutines OOM’ing an lnd daemon. Previously we didn’t limit the number of outstanding payments that were allowed by a client. Users on machines with a small amount of RAM were reporting crashes when sending a very large number of payments in a consistent stream. This commit fixes this issue by now using a semaphore to limit the number of outstanding payments (and therefore) goroutines allowed in the SendPayment method.
- Loading branch information