mirror of
https://github.com/php/pecl-networking-ssh2.git
synced 2026-03-23 22:52:06 +01:00
If the SSH2 Session resource has already been closed, the libssh2 session has been as well, and the `LIBSSH2_SESSION*` has been set NULL. If that is the case, we must not call `libssh2_sftp_shutdown()`.
21 lines
362 B
PHP
21 lines
362 B
PHP
--TEST--
|
|
Bug 79631 (SSH disconnect segfault with SFTP (assertion failed))
|
|
--SKIPIF--
|
|
<?php
|
|
require('ssh2_skip.inc');
|
|
ssh2t_needs_auth();
|
|
ssh2t_writes_remote();
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
require('ssh2_test.inc');
|
|
|
|
$ssh = ssh2_connect(TEST_SSH2_HOSTNAME, TEST_SSH2_PORT);
|
|
ssh2t_auth($ssh);
|
|
$sftp = ssh2_sftp($ssh);
|
|
ssh2_disconnect($ssh);
|
|
echo "done\n";
|
|
?>
|
|
--EXPECT--
|
|
done
|