diff --git a/src/github.com/matrix-org/go-neb/clients/clients.go b/src/github.com/matrix-org/go-neb/clients/clients.go index cce5add..098cba9 100644 --- a/src/github.com/matrix-org/go-neb/clients/clients.go +++ b/src/github.com/matrix-org/go-neb/clients/clients.go @@ -4,6 +4,7 @@ import ( "net/http" "strings" "sync" + "time" log "github.com/Sirupsen/logrus" "github.com/matrix-org/go-neb/api" @@ -350,7 +351,17 @@ func (c *Clients) newClient(config api.ClientConfig) (*gomatrix.Client, error) { } if config.Sync { - go client.Sync() + go func() { + for { + if e := client.Sync(); e != nil { + log.WithFields(log.Fields{ + log.ErrorKey: e, + "user_id": config.UserID, + }).Error("Fatal Sync() error") + time.Sleep(10 * time.Second) + } + } + }() } return client, nil diff --git a/vendor/manifest b/vendor/manifest index dd0a845..1027008 100644 --- a/vendor/manifest +++ b/vendor/manifest @@ -138,7 +138,7 @@ { "importpath": "github.com/matrix-org/gomatrix", "repository": "https://github.com/matrix-org/gomatrix", - "revision": "16b47cb061d2bc08761824259f4e453fe5dbd023", + "revision": "e66d1ef529b7851262b49dc42a26ff1f1d1d9e4d", "branch": "master" }, { diff --git a/vendor/src/github.com/matrix-org/gomatrix/store.go b/vendor/src/github.com/matrix-org/gomatrix/store.go index 20d40b8..6dc687e 100644 --- a/vendor/src/github.com/matrix-org/gomatrix/store.go +++ b/vendor/src/github.com/matrix-org/gomatrix/store.go @@ -60,5 +60,6 @@ func NewInMemoryStore() *InMemoryStore { return &InMemoryStore{ Filters: make(map[string]string), NextBatch: make(map[string]string), + Rooms: make(map[string]*Room), } }