Tests: prevented writing non-chopped frames to the closed socket.

This commit is contained in:
Andrey Zelenkov
2019-09-02 14:55:00 +03:00
parent cb36616132
commit 70e808040d
2 changed files with 4 additions and 2 deletions

View File

@@ -818,7 +818,6 @@ class TestNodeWebsockets(TestApplicationNode):
self.check_close(sock, 1002)
@unittest.skip('not yet')
def test_node_websockets_5_1__5_20(self):
self.load('websockets/mirror')

View File

@@ -173,7 +173,10 @@ class TestApplicationWebsocket(TestApplicationProto):
frame = self.frame_to_send(*args, **kwargs)
if chopsize is None:
sock.sendall(frame)
try:
sock.sendall(frame)
except BrokenPipeError:
pass
else:
pos = 0