I noticed that the hashrate was going down (or even stopped completely) while a hash is getting submitted to the server. I think you should move this part of the code in a web worker in order to keep the mining process alone in the main thread, which would fix this issue!
Yes we pause the hash rate temporarily while the request is submitted and then restart on server confirmation. It’s just to ensure the submission of a found hash gets through. It’s probably not necessary and we could just leave the hashing running.