File tree Expand file tree Collapse file tree 6 files changed +6
-10
lines changed
Expand file tree Collapse file tree 6 files changed +6
-10
lines changed Original file line number Diff line number Diff 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 ()
Original file line number Diff line number Diff 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 ()
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ proc handleTlsConnCb(
163163 await stream.closeWait ()
164164
165165proc accept * (server: HttpServer ): Future [HttpRequest ]
166- {.async , raises : [ Defect , HttpError ] .} =
166+ {.async .} =
167167
168168 if not isNil (server.handler):
169169 raise newException (HttpError ,
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 # #
You can’t perform that action at this time.
0 commit comments