From 412c35b2b235d22d37f2c9453aadb03ff631c402 Mon Sep 17 00:00:00 2001 From: decfox Date: Fri, 25 Oct 2024 15:33:10 +0530 Subject: [PATCH] refactor(oonimkall): expose the session close call --- pkg/oonimkall/session.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkg/oonimkall/session.go b/pkg/oonimkall/session.go index 9933208348..fa7bae5489 100644 --- a/pkg/oonimkall/session.go +++ b/pkg/oonimkall/session.go @@ -254,6 +254,13 @@ func (sess *Session) NewContextWithTimeout(timeout int64) *Context { return &Context{cancel: cancel, ctx: ctx} } +// Close closes the session. This is done by closing the embedded engine +// session +func (sess *Session) Close() error { + err := sess.sessp.Close() + return err +} + // GeolocateResults contains the results of session.Geolocate. type GeolocateResults struct { // ASN is the autonomous system number.