diff options
Diffstat (limited to 'connection_handler.go')
-rw-r--r-- | connection_handler.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/connection_handler.go b/connection_handler.go index 4e92ccf..cd3d7d0 100644 --- a/connection_handler.go +++ b/connection_handler.go @@ -235,7 +235,7 @@ func (ch *connectionHandlerImpl) Complete(handler *StreamHandler) { streamsIDs := append(client.documentsIDs, server.documentsIDs...) if len(streamsIDs) > 0 { n, err := ch.Storage().Update(ConnectionStreams). - Filter(OrderedDocument{{"_id", UnorderedDocument{"$in": streamsIDs}}}). + Filter(OrderedDocument{{Key: "_id", Value: UnorderedDocument{"$in": streamsIDs}}}). Many(UnorderedDocument{"connection_id": connectionID}) if err != nil { log.WithError(err).WithField("connection", connection).Error("failed to update connection streams") @@ -270,7 +270,7 @@ func (ch *connectionHandlerImpl) UpdateStatistics(connection Connection) { var results interface{} if _, err := ch.Storage().Update(Statistics).Upsert(&results). - Filter(OrderedDocument{{"_id", time.Unix(rangeStart*60, 0)}}). + Filter(OrderedDocument{{Key: "_id", Value: time.Unix(rangeStart*60, 0)}}). OneComplex(UnorderedDocument{"$inc": updateDocument}); err != nil { log.WithError(err).WithField("connection", connection).Error("failed to update connection statistics") } |