Merge pull request #3 from anttihirvonen/qt-preview

Fix socket to wait for data after WebSocket upgrade
Close socket properly when a client disconnects