summaryrefslogtreecommitdiffhomepage
path: root/test/unit/applications
diff options
context:
space:
mode:
authorAndrey Zelenkov <zelenkov@nginx.com>2019-09-02 14:55:00 +0300
committerAndrey Zelenkov <zelenkov@nginx.com>2019-09-02 14:55:00 +0300
commit70e808040dab5013654ed1156d34bac3d36c263c (patch)
tree6c7806d916f57e57e922fba9ae2d2d193d89a504 /test/unit/applications
parentcb36616132434853707714cb548f03080950c08f (diff)
downloadunit-70e808040dab5013654ed1156d34bac3d36c263c.tar.gz
unit-70e808040dab5013654ed1156d34bac3d36c263c.tar.bz2
Tests: prevented writing non-chopped frames to the closed socket.
Diffstat (limited to '')
-rw-r--r--test/unit/applications/websockets.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/unit/applications/websockets.py b/test/unit/applications/websockets.py
index 47eebd9c..3553af6e 100644
--- a/test/unit/applications/websockets.py
+++ b/test/unit/applications/websockets.py
@@ -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