fix: add nil check in Forwarder.Close to avoid panic (issue #36)
All checks were successful
Docker Build and Push / build-and-push (push) Successful in 4m8s
All checks were successful
Docker Build and Push / build-and-push (push) Successful in 4m8s
This commit is contained in:
@ -171,7 +171,7 @@ func (f *Forwarder) WriteBadGatewayResponse(dst io.Writer) {
|
||||
}
|
||||
|
||||
func (f *Forwarder) Close() error {
|
||||
if f.GetTunnelType() != types.HTTP {
|
||||
if f.GetListener() != nil {
|
||||
return f.Listener.Close()
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user