mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-12 16:59:44 +00:00
PrepareEncryptionTask: do not store onCompletion as a field
pthreads will screw around with it and make it do things it's not supposed to, which is the exact reason why we have thread-local storage to begin with.
This commit is contained in:
parent
ff53ddd3ad
commit
e392a6a807
@ -45,11 +45,6 @@ class PrepareEncryptionTask extends AsyncTask{
|
||||
private $handshakeJwt = null;
|
||||
/** @var PublicKeyInterface */
|
||||
private $clientPub;
|
||||
/**
|
||||
* @var \Closure
|
||||
* @phpstan-var \Closure(string $encryptionKey, string $handshakeJwt) : void
|
||||
*/
|
||||
private $onCompletion;
|
||||
|
||||
/**
|
||||
* @phpstan-param \Closure(string $encryptionKey, string $handshakeJwt) : void $onCompletion
|
||||
@ -62,7 +57,6 @@ class PrepareEncryptionTask extends AsyncTask{
|
||||
$this->serverPrivateKey = self::$SERVER_PRIVATE_KEY;
|
||||
$this->clientPub = $clientPub;
|
||||
$this->storeLocal(self::TLS_KEY_ON_COMPLETION, $onCompletion);
|
||||
$this->onCompletion = $onCompletion;
|
||||
}
|
||||
|
||||
public function onRun() : void{
|
||||
|
Loading…
x
Reference in New Issue
Block a user