htlcswitch: use an atomic load for link bandwidth during local dispatch

This commit is contained in:
Olaoluwa Osuntokun committed 2017-01-07 21:22:14 -08:00
1 parent a89de14c69
commit 60914029da
1 file changed
+1 -1
+1 -1
View File
@@ -256,7 +256,7 @@ out:
// * avoid full channel depletion at higher
// level (here) instead of within state
// machine?
if link.availableBandwidth < int64(amt) {
if atomic.LoadInt64(&link.availableBandwidth) < int64(amt) {
continue
}