Skip to content

Commit 8ddd46e

Browse files
committed
Tolerate instances where TebexThread is in a frozen stage
1 parent dd9d18f commit 8ddd46e

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

plugin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Tebex
22
main: muqsit\tebex\Loader
3-
version: 0.1.8
3+
version: 0.1.9
44
author: Muqsit
55
api: 5.0.0
66
permissions:

src/muqsit/tebex/thread/TebexThread.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
use Exception;
88
use Generator;
9-
use Logger;
109
use muqsit\tebexapi\connection\handler\TebexConnectionHandler;
1110
use muqsit\tebexapi\connection\request\TebexRequest;
1211
use muqsit\tebexapi\connection\request\TebexRequestHolder;
@@ -73,7 +72,7 @@ public function push(TebexRequest $request, TebexResponseHandler $handler) : voi
7372
$this->incoming[] = igbinary_serialize(new TebexRequestHolder($request, $handler_id));
7473
self::$handlers[$handler_id] = $handler;
7574
++$this->busy_score;
76-
$this->synchronized($this->notifyOne(...));
75+
$this->synchronized($this->notify(...));
7776
}
7877

7978
protected function onRun() : void{
@@ -97,8 +96,7 @@ protected function onRun() : void{
9796
}catch(TebexException $e){
9897
$response_holder = new TebexResponseFailureHolder($request_holder->handler_id, $e);
9998
}catch(Exception $e){
100-
$this->logger->logException($e);
101-
throw $e;
99+
$response_holder = new TebexResponseFailureHolder($request_holder->handler_id, new TebexException($e->getMessage(), 5000, $e->getCode(), $e));
102100
}
103101

104102
$this->outgoing[] = igbinary_serialize($response_holder);

0 commit comments

Comments
 (0)