Created
October 6, 2017 05:53
-
-
Save chantra/b774ae2e6661a6cc52e1b48bd4b33f73 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/exabgp/reactor/network/connection.py b/lib/exabgp/reactor/network/connection.py | |
index 15763d7..def737f 100644 | |
--- a/lib/exabgp/reactor/network/connection.py | |
+++ b/lib/exabgp/reactor/network/connection.py | |
@@ -43,9 +43,11 @@ class Connection (object): | |
# peer and local are strings of the IP | |
try: | |
self.defensive = environment.settings().debug.defensive | |
+ self.max_loop_speed = environment.settings().reactor.speed | |
self.logger = Logger() | |
except RuntimeError: | |
self.defensive = True | |
+ self.max_loop_speed = 1.0 | |
self.logger = FakeLogger() | |
self.afi = afi | |
@@ -88,7 +90,7 @@ class Connection (object): | |
def reading (self): | |
while True: | |
try: | |
- r,_,_ = select.select([self.io,],[],[],0) | |
+ r,_,_ = select.select([self.io,],[],[],self.max_loop_speed/100) | |
except select.error as exc: | |
if exc.args[0] not in error.block: | |
self.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment