diff --git a/internal/msggateway/client_conn.go b/internal/msggateway/client_conn.go index 15a0d8c07..0fb1620a6 100644 --- a/internal/msggateway/client_conn.go +++ b/internal/msggateway/client_conn.go @@ -208,7 +208,11 @@ func (c *websocketClientConn) pingHandler(appData string) error { return nil } -func (c *websocketClientConn) pongHandler(string) error { +func (c *websocketClientConn) pongHandler(appData string) error { + log.ZDebug(context.Background(), "pong handler recv pong", "remoteAddr", c.conn.RemoteAddr(), "appData", appData) + if err := c.setReadDeadline(); err != nil { + return err + } return nil } diff --git a/pkg/common/storage/database/mgo/conversation.go b/pkg/common/storage/database/mgo/conversation.go index 2f9c063cc..30f08f5e5 100644 --- a/pkg/common/storage/database/mgo/conversation.go +++ b/pkg/common/storage/database/mgo/conversation.go @@ -47,6 +47,12 @@ func NewConversationMongo(db *mongo.Database) (*ConversationMgo, error) { }, Options: options.Index(), }, + { + Keys: bson.D{ + {Key: "conversation_id", Value: 1}, + }, + Options: options.Index(), + }, }) if err != nil { return nil, errs.Wrap(err)