Websocket - Send two consecutive close frames
Submitted by Italo Guerrieri
Assigned to libsoup-maint@gnome.bugs
Link to original bug (#794119)
Description
Autobahn's test case 7.1.2 (https://github.com/crossbario/autobahn-testsuite) sends two close frames and expects to receive back only one clean close. What happen is that libsoup instead does not send back any close message.
This seems to be caused by the function "receive_close" of the file "soup-websocket-connection.c". In which at the first close the boolean "pv->close_sent" is set to true also if the close has not been already sent. So the second close received cause the shutdown of the connection.