mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-31 10:22:15 +00:00
fixes bareExcept warnings; catch specific exceptions (#21119)
* fixes bareExcept warnings; catch specific exceptions
* Update lib/pure/coro.nim
(cherry picked from commit 9207d77848)
This commit is contained in:
@@ -375,7 +375,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)
|
||||
|
||||
Reference in New Issue
Block a user