Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

prevent available from going negative

  • Loading branch information...
commit 5248899c3328447b04d6ba6a8669aad280aaf0f6 1 parent 54cfbf7
Rafael H. Schloming authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  link.py
View
2  link.py
@@ -293,7 +293,7 @@ def do_transfer(self, xfr):
u = self._units(xfr)
self.link_credit -= u
self.transfer_count += u
- self.available -= u
+ self.available = max(0, self.available - u)
def do_flow_state(self, state):
if self.transfer_count is not None:
Please sign in to comment.
Something went wrong with that request. Please try again.