Skip to content

Commit

Permalink
Merge pull request #207 from sljeff/fix-close-stubext
Browse files Browse the repository at this point in the history
fix close stubext
  • Loading branch information
HeathLee authored Sep 8, 2020
2 parents f7efc4b + 176fd55 commit d940c72
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion extensions/stubext/ext.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,12 @@ func (d *StubExt) Application() *gobay.Application { return d.app }

func (d *StubExt) Object() interface{} { return d }

func (d *StubExt) Close() error { return d.conn.Close() }
func (d *StubExt) Close() error {
if d.Mocked {
return nil
}
return d.conn.Close()
}

func (d *StubExt) Init(app *gobay.Application) error {
if d.NS == "" {
Expand Down

0 comments on commit d940c72

Please sign in to comment.