THRIFT-5132 Warning in TSocket when using ssl connection
Client: PHP
Patch: Vladimir Panivko
This closes #2160
diff --git a/lib/php/lib/Transport/TSocket.php b/lib/php/lib/Transport/TSocket.php
index 374037a..8fe60fd 100644
--- a/lib/php/lib/Transport/TSocket.php
+++ b/lib/php/lib/Transport/TSocket.php
@@ -251,8 +251,9 @@
}
if (function_exists('socket_import_stream') && function_exists('socket_set_option')) {
- $socket = socket_import_stream($this->handle_);
- socket_set_option($socket, SOL_TCP, TCP_NODELAY, 1);
+ // warnings silenced due to bug https://bugs.php.net/bug.php?id=70939
+ $socket = @socket_import_stream($this->handle_);
+ @socket_set_option($socket, SOL_TCP, TCP_NODELAY, 1);
}
}