|
View:
New views
1 Messages
—
Rating Filter:
Alert me
|
|
|
configurable yaws timeoutHi Everyone,
We have a requirement to make yaws' timeout configurable in order to have it play nicely with the rest of the components in our system. It seems that the timeout is hard coded via macro in yaws.hrl I added a read_timeout to gconf, and then referred to it in the yaws:do_recv(Sock, Num, nossl) via the process dictionary. I don't know if it would be of general use, but it serves our purposes. Regards, Bruce --- ./yaws-1.84/include/yaws.hrl.orig 2009-07-06 03:20:13.000000000 +0900 +++ ./yaws-1.84/include/yaws.hrl 2009-10-07 15:21:50.000000000 +0900 @@ -77,6 +77,8 @@ max_num_cached_files = 400, max_num_cached_bytes = 1000000, %% 1 MEG max_size_cached_file = 8000, + read_timeout = 30000, %% configurable ?READ_TIMEOUT large_file_chunk_size = 10240, mnesia_dir = [], log_wrap_size = 10000000, % wrap logs after 10M -- ./yaws-1.84/src/yaws.erl.orig 2009-07-06 03:20:13.000000000 +0900 +++ ./yaws-1.84/src/yaws.erl 2009-10-07 15:25:20.000000000 +0900 @@ -1707,9 +1707,9 @@ do_recv(Sock, Num, nossl) -> - gen_tcp:recv(Sock, Num, ?READ_TIMEOUT); + gen_tcp:recv(Sock, Num, (get(gc))#gconf.read_timeout); do_recv(Sock, Num, ssl) -> - ssl:recv(Sock, Num, ?READ_TIMEOUT). + ssl:recv(Sock, Num, (get(gc))#gconf.read_timeout). cli_recv(S, Num, SslBool) -> [bwhite.vcf] begin:vcard fn:Bruce White n:White;Bruce org:;Server Engineering adr:Ebisu MF Bldg. 2F;;4-6-1 Ebisu, Shibuya-ku;Tokyo;;150-0013;Japan email;internet:bwhite@... title:Developer tel;work:81.3-5792-4311 tel;fax:81.3.5792.4322 x-mozilla-html:TRUE url:www.geminimobile.com version:2.1 end:vcard ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Erlyaws-list mailing list Erlyaws-list@... https://lists.sourceforge.net/lists/listinfo/erlyaws-list |
| Free embeddable forum powered by Nabble | Forum Help |