'Socket closed' by the server when running tests

Hello there,

we have an Implementation for the client side of the WebSocket protocol as described in RFC 6455.

We test this implementation using the autobahn suite crossbario/autobahn-testsuite:0.8.2. We tested it locally using the docker image (executing docker pull crossbario/autobahn-testsuite:0.8.2).

How do we test:

  1. We start the fuzzy server
  2. Our test setup asks from the fuzzy server all possible tests (with some exceptions), and then connects to them one by one, using the appropriate resource when connecting to execute the test.

Here is our issue:
While testing it sometimes happens that the server sends an error saying “Socket closed”. This of course causes the test to fail.
It seems to happen especially with the tests of the “family” 5.X, meaning 5.1, 5.2, etc.

It also happens in an indeterministic way, at least I have no found a pattern yet.

Have you seen a similiar problem before? Why would the server close the socket / connection, suddenly?

Thanks in advance for your help,