Skip to content

Commit 90e81f2

Browse files
author
tomponline
committed
Adds restore_error_handler to isTLSRequired error handler
1 parent 7164c92 commit 90e81f2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Nats/Connection.php

+1
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,7 @@ public function connect($timeout = null)
457457
if ($this->serverInfo->isTLSRequired()) {
458458
set_error_handler(
459459
function ($errno, $errstr, $errfile, $errline) {
460+
restore_error_handler();
460461
throw Exception::forFailedConnection($errstr);
461462
});
462463

0 commit comments

Comments
 (0)