don't complain about closed websockets in pipe connections

This commit is contained in:
Matthias Radestock
2016-08-06 00:06:34 +01:00
parent c3315f9c99
commit 7480654aaf

View File

@@ -311,7 +311,10 @@ func (c *appClient) pipeConnection(id string, pipe xfer.Pipe) (bool, error) {
defer c.closeConn(id)
_, remote := pipe.Ends()
return false, pipe.CopyToWebsocket(remote, conn)
if err := pipe.CopyToWebsocket(remote, conn); err != nil && !xfer.IsExpectedWSCloseError(err) {
return false, err
}
return false, nil
}
func (c *appClient) PipeConnection(id string, pipe xfer.Pipe) {