mjpeg_stopthread() no longer blocks when called while the socket is connecting.