Browse Source

check closed state on ssl handshake

walkor 6 years ago
parent
commit
0506d795e3
1 changed files with 3 additions and 0 deletions
  1. 3 0
      Connection/AsyncTcpConnection.php

+ 3 - 0
Connection/AsyncTcpConnection.php

@@ -318,6 +318,9 @@ class AsyncTcpConnection extends TcpConnection
             // SSL handshake.
             // SSL handshake.
             if ($this->transport === 'ssl') {
             if ($this->transport === 'ssl') {
                 $this->_sslHandshakeCompleted = $this->doSslHandshake($this->_socket);
                 $this->_sslHandshakeCompleted = $this->doSslHandshake($this->_socket);
+                if ($this->_sslHandshakeCompleted === false) {
+                    return;
+                }
             } else {
             } else {
                 // There are some data waiting to send.
                 // There are some data waiting to send.
                 if ($this->_sendBuffer) {
                 if ($this->_sendBuffer) {