diff --git a/pkg/oonimkall/session.go b/pkg/oonimkall/session.go index 993320834..f557aeb94 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 and ensures that any tunnel (if open) is stopped +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.