bfenetworks / bfe

A modern layer 7 load balancer from baidu
https://www.bfe-networks.net
Apache License 2.0
6.08k stars 942 forks source link

bfe_server.go在InitConfig()漏掉了对WriteTimeout的赋值 #1152

Open cherishman2005 opened 3 months ago

cherishman2005 commented 3 months ago

bfe master分支 以及v1.6.0等分支漏掉了对WriteTimeout的赋值 https://github.com/bfenetworks/bfe/blob/release/v1.6.0/bfe_server/bfe_server.go

image

image

xuleiming commented 3 months ago

感谢你的问题! 目前,srv.WriteTimeout 并没有被使用,所以没有赋值并没有影响。ConfigBasic.ClientWriteTimeout 目前是个多余的配置项,没有被使用。 真正起作用的 ClientWriteTimeout 值是 cluster_conf.data 中每个cluster配的 ClusterBasic.TimeoutWriteClient

cherishman2005 commented 1 month ago

srv.WriteTimeout 并没有被使用,所以没有赋值并没有影响。

为了保证bfe代码中配置参数的完整性,应该赋值。希望@xuleiming 方便时更新下。我在基于BFE做二次开发,在前半段(client->BFEserver)需要使用WriteTimeout变量。