mirror of
https://github.com/lightninglabs/lightning-terminal.git
synced 2026-08-13 12:33:36 +02:00
config: fix nil pointer if listening fails
This commit is contained in:
parent
39214e121d
commit
fe0b446d38
1 changed files with 5 additions and 1 deletions
|
|
@ -796,7 +796,11 @@ func (l *onDemandListener) Accept() (net.Conn, error) {
|
|||
// Close closes the listener.
|
||||
// Any blocked Accept operations will be unblocked and return errors.
|
||||
func (l *onDemandListener) Close() error {
|
||||
return l.lis.Close()
|
||||
if l.lis != nil {
|
||||
return l.lis.Close()
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Addr returns the listener's network address.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue