Browse Source

set {nodelay, true} when connecting

Will 16 years ago
parent
commit
233db10333
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/pgsql_sock.erl

+ 1 - 1
src/pgsql_sock.erl

@@ -47,7 +47,7 @@ init([C, Host, Username, Opts]) ->
     end,
     end,
 
 
     Port = proplists:get_value(port, Opts, 5432),
     Port = proplists:get_value(port, Opts, 5432),
-    SockOpts = [{active, false}, {packet, raw}, binary],
+    SockOpts = [{active, false}, {packet, raw}, binary, {nodelay, true}],
     {ok, S} = gen_tcp:connect(Host, Port, SockOpts),
     {ok, S} = gen_tcp:connect(Host, Port, SockOpts),
 
 
     State = #state{
     State = #state{