Skip to content

Commit

Permalink
net/mux: add Close function in net mux (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
fatedier authored Feb 12, 2025
1 parent a29f858 commit 1d42023
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions net/mux/mux.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ func (mux *Mux) DefaultListener() net.Listener {
return mux.defaultLn
}

func (mux *Mux) Close() error {
return mux.ln.Close()
}

func (mux *Mux) release(ln *listener) bool {
result := false
mux.mu.Lock()
Expand Down

0 comments on commit 1d42023

Please sign in to comment.