Browse Source

Move commit to commit less often

Foppe Hemminga 6 năm trước cách đây
mục cha
commit
b159924ef3
1 tập tin đã thay đổi với 6 bổ sung0 xóa
  1. 6 0
      main.py

+ 6 - 0
main.py

@@ -152,6 +152,12 @@ if __name__ == '__main__':
                 view.broadcast(long_message)
                 # Best would be to now store horses that were just broadcast
                 long_message = this_message
+
+        # Send all messages
+        if len(long_message) > 0:
+            view.broadcast(long_message)
+            long_message = ''
+
         # Send only or last message
         if len(leftover_message) > 0:
             view.broadcast(leftover_message)