File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -1593,16 +1593,21 @@ by both peers.
15931593A naive implementation would thus wait until it receives the
15941594close notify message from the peer - which conflicts with the commonly expected
15951595semantic that a close will not block. The default behavior is thus to only send
1596- a close notify but not wait for the close notify of the peer. If this is
1597- required C<SSL_fast_shutdown> need to be explicitly set to false.
1596+ a close notify but not wait for the close notify of the peer.
1597+ If it should instead wait for a close notify from the peer than
1598+ C<SSL_fast_shutdown> must be explicitly set to false:
1599+
1600+ $self->close(SSL_fast_shutdown => 0);
15981601
15991602There are also cases where a SSL shutdown should not be done at all. This is
16001603true for example when forking to let a child deal with the socket and closing
16011604the socket in the parent process. A naive explicit C<close> or an implicit close
16021605when destroying the socket in the parent would send a close notify to the peer
16031606which would make the SSL socket in the client process unusable. In this case an
16041607explicit C<close> with C<SSL_no_shutdown> set to true should be done in the
1605- parent process.
1608+ parent process:
1609+
1610+ $self->close(SSL_no_shutdown => 1);
16061611
16071612For more details and other arguments see C<stop_SSL> which gets called from
16081613C<close> to shutdown the SSL state of the socket.
You can’t perform that action at this time.
0 commit comments