GODT-1056 Check encrypted size of the message before upload

This commit is contained in:
Michal Horejsek
2021-04-13 15:19:56 +02:00
parent 22bf8f62ce
commit 8ccaac8090
5 changed files with 237 additions and 63 deletions

View File

@ -99,6 +99,11 @@ func (loop *eventLoop) setFirstEventID() (err error) {
// pollNow starts polling events right away and waits till the events are
// processed so we are sure updates are propagated to the database.
func (loop *eventLoop) pollNow() {
// When event loop is not running, it would cause infinite wait.
if !loop.isRunning {
return
}
eventProcessedCh := make(chan struct{})
loop.pollCh <- eventProcessedCh
<-eventProcessedCh