Other: fix minor typo

This commit is contained in:
Romain LE JEUNE
2022-10-24 07:37:15 +02:00
parent aae60b2ef8
commit 7f7961ae0c
3 changed files with 4 additions and 4 deletions

View File

@ -91,7 +91,7 @@ func (c *controller) ListenAndServe() {
} }
if err != nil { if err != nil {
l.WithError(err).Error("Cannot start listner.") l.WithError(err).Error("Cannot start listener.")
c.signals.Emit(events.ErrorEvent, string(c.server.Protocol())+" failed: "+err.Error()) c.signals.Emit(events.ErrorEvent, string(c.server.Protocol())+" failed: "+err.Error())
return return
} }

View File

@ -153,7 +153,7 @@ func (q *sendRecorder) deleteExpiredKeys() {
for key, value := range q.hashes { for key, value := range q.hashes {
// It's hard to find a good expiration time. // It's hard to find a good expiration time.
// On the one hand, a user could set up some cron job sending the same message over and over again (heartbeat). // On the one hand, a user could set up some cron job sending the same message over and over again (heartbeat).
// On the the other, a user could put the device into sleep mode while sending. // On the other, a user could put the device into sleep mode while sending.
// Changing the expiration time will always make one of the edge cases worse. // Changing the expiration time will always make one of the edge cases worse.
// But both edge cases are something we don't care much about. Important thing is we don't send the same message many times. // But both edge cases are something we don't care much about. Important thing is we don't send the same message many times.
if time.Since(value.time) > 30*time.Minute { if time.Since(value.time) > 30*time.Minute {

View File

@ -245,7 +245,7 @@ func (store *Store) createOrUpdateMessageEvent(msg *pmapi.Message) error {
func (store *Store) createOrUpdateMessagesEvent(msgs []*pmapi.Message) error { //nolint:funlen func (store *Store) createOrUpdateMessagesEvent(msgs []*pmapi.Message) error { //nolint:funlen
store.log.WithField("msgs", msgs).Trace("Creating or updating messages in the store") store.log.WithField("msgs", msgs).Trace("Creating or updating messages in the store")
// Strip non meta first to reduce memory (no need to keep all old msg ID data during update). // Strip non-meta first to reduce memory (no need to keep all old msg ID data during update).
err := store.db.View(func(tx *bolt.Tx) error { err := store.db.View(func(tx *bolt.Tx) error {
b := tx.Bucket(metadataBucket) b := tx.Bucket(metadataBucket)
for _, msg := range msgs { for _, msg := range msgs {
@ -321,7 +321,7 @@ func clearNonMetadata(onlyMeta *pmapi.Message) {
onlyMeta.Attachments = nil onlyMeta.Attachments = nil
} }
// txUpdateMetadataFromDB changes the the onlyMeta data. // txUpdateMetadataFromDB changes the onlyMeta data.
// If there is stored message in metaBucket the size, header and MIMEType are // If there is stored message in metaBucket the size, header and MIMEType are
// not changed if already set. To change these: // not changed if already set. To change these:
// * size must be updated by Message.SetSize // * size must be updated by Message.SetSize