mjpclab / go-http-file-server

Simple command line based HTTP file server to share local file system
MIT License
379 stars 55 forks source link

TCP connections remain opened #44

Open fimmspin opened 5 months ago

fimmspin commented 5 months ago

I noted that some TCP connections remain opened (even days...) and never closed, until i close the ghfs (windows). May be ghfs could track opened but inactive connections and close them at least once a day?

marjune163 commented 5 months ago

I don't think ghfs hold connections. Maybe client side keep connection for some reason(e.g. for quick reconnect)? Then that's not ghfs's business. If you don't think so, please provide the exact way to reproduce and the way to how check the connection. BTW: Are you using https or plan http?

fimmspin commented 5 months ago

I think they are connections that the Chrome browser keeps open, even for days, until i close the browser. May be not ghfs fault, at least ghfs could close connections for real inactivity after xxx minutes, to keep server's connection number 'low'. I tried using plain http,, always using basic authentication.