summary refs log tree commit diff stats
path: root/lib/pure/asynchttpserver.nim
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pure/asynchttpserver.nim')
-rw-r--r--lib/pure/asynchttpserver.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pure/asynchttpserver.nim b/lib/pure/asynchttpserver.nim
index 9b369c4bc..0638d21aa 100644
--- a/lib/pure/asynchttpserver.nim
+++ b/lib/pure/asynchttpserver.nim
@@ -381,7 +381,7 @@ const
 proc listen*(server: AsyncHttpServer; port: Port; address = ""; domain = AF_INET) =
   ## Listen to the given port and address.
   when declared(maxDescriptors):
-    server.maxFDs = try: maxDescriptors() except: nimMaxDescriptorsFallback
+    server.maxFDs = try: maxDescriptors() except OSError: nimMaxDescriptorsFallback
   else:
     server.maxFDs = nimMaxDescriptorsFallback
   server.socket = newAsyncSocket(domain)