justcoding121 / titanium-web-proxy

A cross-platform asynchronous HTTP(S) proxy server in C#.
MIT License
1.93k stars 618 forks source link

TCP connections linger open when hosts are down #896

Open valeriob opened 2 years ago

valeriob commented 2 years ago

Hi, i noticed that the proxy keeps a lot of connections open even to hosts that are no longer online, is there some parameter i can tune so that those connections do not linger around ? it happend already twice that proxy exausted the server ports.

Thanks

honfika commented 2 years ago

No, there is no option in TWP. The socket is configured here: https://github.com/justcoding121/titanium-web-proxy/blob/cfddda60a60879e5fab03b4912511e0c61ca3fac/src/Titanium.Web.Proxy/Network/TcpConnection/TcpConnectionFactory.cs#L408-L411

Someting is already set. Do you know how to properly configure the socket?