From: Scott Worley Date: Sat, 28 Jul 2012 17:33:18 +0000 (-0700) Subject: Wait when since == last message time X-Git-Url: http://git.scottworley.com/reliable-chat/commitdiff_plain/842eacb46d084f3b694c42afe22db6d7a3afc3b7?ds=sidebyside;hp=87ac1d98245de076b321b149cf8c36795f4425e6 Wait when since == last message time --- diff --git a/server/server.go b/server/server.go index 8c8a989..f9c4857 100644 --- a/server/server.go +++ b/server/server.go @@ -48,7 +48,7 @@ func manage_store(store Store) { 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()