Catch connection closed errors

This commit is contained in:
Zed 2020-06-07 08:23:05 +02:00
parent 9c8c2cbe88
commit 40ef23956a

View file

@ -55,7 +55,7 @@ proc proxyMedia*(req: jester.Request; url: string): Future[HttpCode] {.async.} =
if hasValue:
await request.client.send(data)
data.setLen 0
except HttpRequestError, OSError:
except HttpRequestError, ProtocolError, OSError:
result = Http404
finally:
client.safeClose()