This project connects to a websocket and closes the connection a abnormal way.
python3 -m venv .venv
source .venv/bin/activate
pip install websocket-client==1.7.0
To execute all you have to do is run and when you want to simulate the connection press ctrl+c.
python3 main.py 'ws://localhost/ws