Skip to content

Commit efb8d7f

Browse files
committed
[mod-misty] feat(lib/rest): supporting dropping connections
1 parent ee97025 commit efb8d7f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/rest/rest.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,3 +522,9 @@ func (api *Client) callCodec(ctx context.Context, opts *Opts, request interface{
522522
err = decode(resp, response)
523523
return resp, err
524524
}
525+
526+
func (api *Client) DropConns() {
527+
if transport, ok := api.c.Transport.(*http.Transport); ok {
528+
transport.CloseIdleConnections()
529+
}
530+
}

0 commit comments

Comments
 (0)