Skip to content

Commit

Permalink
Removing error - topology is closed
Browse files Browse the repository at this point in the history
Changed line 73 to fix the connection issue to mongodb
  • Loading branch information
Ganitagya authored and Frank Martinez committed Aug 13, 2018
1 parent 117cf95 commit adac5e1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion activity/mongodb/activity.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,13 @@ func (a *MongoDbActivity) Eval(ctx activity.Context) (done bool, err error) {
value := ctx.GetInput(ivData)

//todo implement shared sessions
client, err := mongo.NewClient(connectionURI)
// client, err := mongo.NewClient(connectionURI)
/*
The above function was giving below error;
"data not inserted topology is closed"
*/

client, err := mongo.Connect(context.Background(), connectionURI, nil)
if err != nil {
activityLog.Errorf("Connection error: %v", err)
return false, err
Expand Down

0 comments on commit adac5e1

Please sign in to comment.