Skip to content

Commit b31ff99

Browse files
committed
Remove async raises
They are wrong
1 parent 73edde4 commit b31ff99

File tree

6 files changed

+6
-10
lines changed

6 files changed

+6
-10
lines changed

examples/server.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ when isMainModule:
5858
HttpServer.create(initTAddress("127.0.0.1:8888"), flags = socketFlags)
5959

6060
when defined accepts:
61-
proc accepts() {.async, raises: [Defect].} =
61+
proc accepts() {.async.} =
6262
while true:
6363
try:
6464
let req = await server.accept()

tests/helpers.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ proc createServer*(
6262
flags = flags)
6363

6464
when defined accepts:
65-
proc accepts() {.async, raises: [Defect].} =
65+
proc accepts() {.async.} =
6666
try:
6767
let req = await server.accept()
6868
await req.handler()

websock/http/client.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ proc connect*(
170170
tlsMinVersion = TLSVersion.TLS11,
171171
tlsMaxVersion = TLSVersion.TLS12,
172172
hostName = ""): Future[T]
173-
{.async, raises: [Defect, HttpError].} =
173+
{.async.} =
174174

175175
let wantedHostName = if hostName.len > 0:
176176
hostName

websock/http/server.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ proc handleTlsConnCb(
163163
await stream.closeWait()
164164

165165
proc accept*(server: HttpServer): Future[HttpRequest]
166-
{.async, raises: [Defect, HttpError].} =
166+
{.async.} =
167167

168168
if not isNil(server.handler):
169169
raise newException(HttpError,

websock/session.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ proc send*(
9393
ws: WSSession,
9494
data: seq[byte] = @[],
9595
opcode: Opcode): Future[void]
96-
{.async, raises: [Defect, WSClosedError].} =
96+
{.async.} =
9797
## Send a frame
9898
##
9999

websock/websock.nim

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -236,11 +236,7 @@ proc handleRequest*(
236236
request: HttpRequest,
237237
version: uint = WSDefaultVersion): Future[WSSession]
238238
{.
239-
async,
240-
raises: [
241-
Defect,
242-
WSHandshakeError,
243-
WSProtoMismatchError]
239+
async
244240
.} =
245241
## Creates a new socket from a request.
246242
##

0 commit comments

Comments
 (0)