close requests
This commit is contained in:
parent
29a682cce8
commit
ab9926e1d2
2 changed files with 6 additions and 4 deletions
|
@ -126,9 +126,7 @@ class AngelWebSocket {
|
|||
}
|
||||
|
||||
var event = handleAction(action, socket);
|
||||
if (event is Future)
|
||||
event = await event;
|
||||
|
||||
if (event is Future) event = await event;
|
||||
|
||||
if (event is WebSocketEvent) {
|
||||
batchEvent(event);
|
||||
|
@ -169,6 +167,10 @@ class AngelWebSocket {
|
|||
if (!WebSocketTransformer.isUpgradeRequest(req.underlyingRequest))
|
||||
throw new AngelHttpException.BadRequest();
|
||||
|
||||
res
|
||||
..willCloseItself = true
|
||||
..end();
|
||||
|
||||
var ws = await WebSocketTransformer.upgrade(req.underlyingRequest);
|
||||
_clients.add(ws);
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
name: angel_websocket
|
||||
description: WebSocket plugin for Angel
|
||||
version: 1.0.0-dev+2
|
||||
version: 1.0.0-dev+3
|
||||
author: thosakwe <thosakwe@gmail.com>
|
||||
homepage: https://github.com/angel-dart/angel_websocket
|
||||
dependencies:
|
||||
|
|
Loading…
Reference in a new issue