mnet: fix PacketConn closing
This commit is contained in:
parent
a52230b972
commit
015edcd69a
@ -130,7 +130,11 @@ func (l *Listener) Accept() (net.Conn, error) {
|
||||
// logging.
|
||||
func (l *Listener) Close() error {
|
||||
mlog.Info("listener closing", l.ctx)
|
||||
return l.Listener.Close()
|
||||
if l.Listener != nil {
|
||||
return l.Listener.Close()
|
||||
} else {
|
||||
return l.PacketConn.Close()
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user