engine-api icon indicating copy to clipboard operation
engine-api copied to clipboard

client add Close function

Open lostz opened this issue 9 years ago • 1 comments

HI all: I use engine-api for my docker monitor,my program run all the time。 I find that taishan 47434 root 9u unix 0xffff882025aae180 0t0 4493265 socket taishan 47434 root 10u unix 0xffff880cbdc1bfc0 0t0 6003816 socket taishan 47434 root 11u unix 0xffff880cbdc1a1c0 0t0 6003974 socket taishan 47434 root 12u unix 0xffff880cbdc1cec0 0t0 6004348 socket taishan 47434 root 13u unix 0xffff880e2e081e00 0t0 5991382 socket taishan 47434 root 14u unix 0xffff882025aae540 0t0 4493267 socket taishan 47434 root 15u unix 0xffff880c82125dc0 0t0 6009421 socket taishan 47434 root 16u unix 0xffff8830273c2d00 0t0 5978477 socket taishan 47434 root 17u unix 0xffff880f8d234b00 0t0 5998242 socket So I advise add a Close function to close the client unix socket。

lostz avatar Jun 08 '16 16:06 lostz

If you make your own http client/transport then pass it to NewClient you can call CloseIdleConnections which should get rid of those.

jhorwit2 avatar Jul 24 '16 02:07 jhorwit2