From 596dcc95b9a76ac0c033a009e58d731c0e332f88 Mon Sep 17 00:00:00 2001 From: Pine Mizune Date: Tue, 3 Jan 2017 10:14:09 +0000 Subject: [PATCH] Fix broken sample code --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 10dd6ec..fc977a3 100644 --- a/README.md +++ b/README.md @@ -37,16 +37,16 @@ class MongoDbPool extends ConnectionPool { /** * Retrieve and release a connection from the pool. */ -app.Interceptor(r'/.*') -dbInterceptor(MongoDbPool pool) { +@app.Interceptor(r'/.*') +dbInterceptor(@app.Inject() MongoDbPool pool) { //get a connection - pool.getConnection().then((managedConnection) { + return pool.getConnection().then((managedConnection) { //save the connection in the attributes map app.request.attributes["conn"] = managedConnection.conn; - app.chain.next(() { + return app.chain.next(() { if (app.chain.error is ConnectionException) { //if a connection is lost, mark it as invalid, so the pool can reopen it //in the next request