Permalink
Browse files

use atom here rather than string (string is still possible though).

  • Loading branch information...
1 parent c9c9a99 commit 746ac2869824602ebe7d83415f27bdb0b902f613 @benoitc committed Aug 3, 2009
Showing with 2 additions and 3 deletions.
  1. +1 −1 README.md
  2. +1 −2 src/couchbeam_client.erl
View
@@ -78,7 +78,7 @@ You can use couchdbkit as an OTP application, allowing you to manage multiple da
2) Add a connection to a node
- 2> couchbeam:open_connection({"mynode", {"127.0.0.1", 5984}}),
+ 2> couchbeam:open_connection({mynode, {"127.0.0.1", 5984}}),
`mynode` will be the name of connection you will use. Then you set the hostname and port of the CouchDB node you want to use. You can setup all the connections you need. It allow you to setup one connection. Later will be added possibility of load balancing. There is a `default` node to 127.0.0.1:5984 created when application starting.
View
@@ -162,8 +162,7 @@ do_req(Method, State, Path, Body, Headers, Fun) ->
{error, Reason} ->
{error, {bad_request, Reason}}
end.
-
-do_close(undefined) -> ok;
+
do_close(Sock) -> gen_tcp:close(Sock).
recv_body(Sock, Headers, Fun) ->

0 comments on commit 746ac28

Please sign in to comment.