Skip to content

Commit 5fa60c0

Browse files
committed
Update README.md
1 parent 4c90ce3 commit 5fa60c0

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ They have sensible defaults.
2626
var client = new memcache.Client(port, host);
2727
client.port = 11211;
2828
client.host = 'localhost';
29-
30-
// connect to the memcache server
31-
client.connect()
3229

3330
The Client object emits 4 important events - connect, close, timeout and error.
3431

@@ -47,6 +44,9 @@ The Client object emits 4 important events - connect, close, timeout and error.
4744
client.on('error', function(e){
4845
// there was an error - exception is 1st argument
4946
});
47+
48+
// connect to the memcache server after subscribing to some or all of these events
49+
client.connect()
5050

5151
After connecting, you can start to make requests.
5252

0 commit comments

Comments
 (0)