Skip to content
This repository was archived by the owner on Oct 30, 2024. It is now read-only.

Commit c604bd3

Browse files
author
tomponline
committed
corrected restore_error_handler call
1 parent b77907a commit c604bd3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Nats/Connection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,12 +457,12 @@ 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

463464
if (!stream_socket_enable_crypto(
464465
$this->streamSocket, true, STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT)) {
465-
restore_error_handler();
466466
throw Exception::forFailedConnection('Error negotiating crypto');
467467
}
468468

0 commit comments

Comments
 (0)