mirror of
https://github.com/openfaas/faasd.git
synced 2025-06-13 02:16:48 +00:00
Return error from proxy
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This commit is contained in:
parent
887c18befa
commit
7dbaeef3d8
@ -75,18 +75,17 @@ func (p *Proxy) Start() error {
|
|||||||
// Wait for a connection.
|
// Wait for a connection.
|
||||||
conn, err := l.Accept()
|
conn, err := l.Accept()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
acceptErr := fmt.Errorf("unable to accept on %d, error: %s",
|
log.Printf("Unable to accept on: %d, error: %s",
|
||||||
p.Port,
|
p.Port,
|
||||||
err.Error())
|
err.Error())
|
||||||
log.Printf("%s", acceptErr.Error())
|
return err
|
||||||
return acceptErr
|
|
||||||
}
|
}
|
||||||
|
|
||||||
upstream, err := net.Dial("tcp", upstreamAddr)
|
upstream, err := net.Dial("tcp", upstreamAddr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
conn.Close()
|
conn.Close()
|
||||||
|
|
||||||
log.Printf("unable to dial to %s, error: %s", upstreamAddr, err.Error())
|
log.Printf("Unable to dial: %s, error: %s", upstreamAddr, err.Error())
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user