File tree 2 files changed +6
-2
lines changed
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ async def connect(self):
34
34
35
35
async def disconnect (self , code ):
36
36
if self .connection_context :
37
- self .connection_context .closed = True
37
+ self .connection_context .socket_closed = True
38
38
await subscription_server .on_close (self .connection_context )
39
39
40
40
async def receive_json (self , content ):
Original file line number Diff line number Diff line change 12
12
class ChannelsConnectionContext (BaseConnectionContext ):
13
13
def __init__ (self , * args , ** kwargs ):
14
14
super (ChannelsConnectionContext , self ).__init__ (* args , ** kwargs )
15
- self .closed = False
15
+ self .socket_closed = False
16
16
17
17
async def send (self , data ):
18
18
if self .closed :
19
19
return
20
20
await self .ws .send_json (data )
21
21
22
+ @property
23
+ def closed (self ):
24
+ return self .socket_closed
25
+
22
26
async def close (self , code ):
23
27
await self .ws .close (code = code )
24
28
You can’t perform that action at this time.
0 commit comments