]> git.scottworley.com Git - reliable-chat/commitdiff
Wait when since == last message time
authorScott Worley <sworley@chkno.net>
Sat, 28 Jul 2012 17:33:18 +0000 (10:33 -0700)
committerScott Worley <sworley@chkno.net>
Sat, 28 Jul 2012 17:33:18 +0000 (10:33 -0700)
server/server.go

index 8c8a9893d61360dd00f3ea643871fe7fb33339d2..f9c4857f1bbf7aeb8f1695c11f01b3706f492ab8 100644 (file)
@@ -48,7 +48,7 @@ func manage_store(store Store) {
                                messages.Remove(messages.Front())
                        }
                case request := <-store.Get:
                                messages.Remove(messages.Front())
                        }
                case request := <-store.Get:
-                       if messages.Back() == nil || request.StartTime.After(messages.Back().Value.(Message).Time) {
+                       if messages.Back() == nil || !request.StartTime.Before(messages.Back().Value.(Message).Time) {
                                waiting.PushBack(request)
                        } else {
                                start := messages.Back()
                                waiting.PushBack(request)
                        } else {
                                start := messages.Back()