Browse Source

Catch connection closed errors

Zed 6 năm trước cách đây
mục cha
commit
40ef23956a
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/routes/media.nim

+ 1 - 1
src/routes/media.nim

@@ -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()