Browse Source

fix conversion to seconds

Daniel Gruno 5 năm trước cách đây
mục cha
commit
4b2cd8a651
1 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 3 3
      pypubsub.py

+ 3 - 3
pypubsub.py

@@ -61,11 +61,11 @@ class Server:
             if bma.endswith('s'):
                 bma = int(bma.replace('s', ''))
             elif bma.endswith('m'):
-                bma = int(bma.replace('m', '') * 60)
+                bma = int(bma.replace('m', '')) * 60
             elif bma.endswith('h'):
-                bma = int(bma.replace('h', '') * 3600)
+                bma = int(bma.replace('h', '')) * 3600
             elif bma.endswith('d'):
-                bma = int(bma.replace('d', '') * 86400)
+                bma = int(bma.replace('d', '')) * 86400
         self.backlog_max_age = bma
 
         if 'ldap' in self.config.get('clients', {}):