Closed haolian9 closed 2 years ago
by the way, i did not mention LocalProtocolError
randomly, i got it's name from
try:
packed_text = server.send(TextMessage(data="hello and welcome"))
except LocalProtocolError:
pass
else:
# raise AssertionError(
# "The application MUST NOT send any more data frames after sending a Close frame."
# )
pass
try:
client.receive_data(packed_text)
except LocalProtocolError:
pass
else:
raise AssertionError("there should be an exception")
Thanks, fixed in b0efe554cca8ac24dcf82940137d04c90351c9c1
reproduce:
according to the rfc:
if i did not misunderstand, i think
server.send()
should raise an LocalProtocolError after it sent the CloseConnection.