From: Brady M. <bra...@gm...> - 2010-05-09 17:32:57
|
erlyaws-list, I was trying to set gconf.keepalive_timeout to make the http sockets stay open for a longer-than-usual time. However, gconf.keepalive_timeout appears to not be honored. I considered the code and could not find anywhere it is being utilized, besides being parsed out of the configuration file. So I made the following modification to yaws.erl, around line 1776: do_recv(Sock, Num, nossl) -> gen_tcp:recv(Sock, Num, (get(gc))#gconf.keepalive_timeout); do_recv(Sock, Num, ssl) -> ssl:recv(Sock, Num, (get(gc))#gconf.keepalive_timeout). %%do_recv(Sock, Num, nossl) -> %% gen_tcp:recv(Sock, Num, ?READ_TIMEOUT); %%do_recv(Sock, Num, ssl) -> %% ssl:recv(Sock, Num, ?READ_TIMEOUT). This causes the socket read timeout to be gconf.keepalive_timeout and I get the behavior I desire. Does anyone know why this might be a bad/wrong idea? Brady |