diff --git a/cmd/root.go b/cmd/root.go index 180fb42e676551fdb663548c5753227d07f87957..c2f704d9df7be1776d962d314fa177f0723bf035 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -447,7 +447,7 @@ var rootCmd = &cobra.Command{ } } else { // Wait up to 45 seconds to receive a message - for end, timeout := true, time.After(45*time.Second); end; { + for end, timeout := false, time.After(45*time.Second); !end; { if text.MessagesReceived > 0 { end = true } diff --git a/io/messaging.go b/io/messaging.go index e2c0f22190d396c53c175f66c5259c890a3e1864..74694176bbe677dfdbca8c6bdec426e1de87e186 100644 --- a/io/messaging.go +++ b/io/messaging.go @@ -208,7 +208,7 @@ func handleE2ESending(session user.Session, // FIXME: This is a hack to prevent a crash, this function should be // able to block until this condition is true. - for end, timeout := false, time.After(60*time.Second); end; { + for end, timeout := false, time.After(60*time.Second); !end; { if rekey { // Get send Rekey key, action = km.PopRekey()