Inheritance: ChannelSession
コード例 #1
0
ファイル: TransportGitSsh.cs プロジェクト: georgeck/GitSharp
            public override void Close()
            {
                base.Close();

                if (_channel != null)
                {
                    try
                    {
                        if (_channel.isConnected())
                        {
                            _channel.disconnect();
                        }
                    }
                    finally
                    {
                        _channel = null;
                    }
                }
            }
コード例 #2
0
            public override void Close()
            {
                base.Close();

                if (_channel == null) return;

                try
                {
                    _exitStatus = _channel.getExitStatus();
                    if (_channel.isConnected())
                    {
                        _channel.disconnect();
                    }
                }
                finally
                {
                    _channel = null;
                }
            }
コード例 #3
0
ファイル: TransportGitSsh.cs プロジェクト: georgeck/GitSharp
            public SshPushConnection(TransportGitSsh instance)
                : base(instance)
            {
                try
                {
                    _channel = instance.Exec(instance.OptionReceivePack);

                    if (_channel.isConnected())
                    {
                        init(_channel.getOutputStream());
                    }
                    else
                    {
                        throw new TransportException(uri, instance._errStream.ToString());
                    }
                }
                catch (TransportException)
                {
                    Close();
                    throw;
                }
                catch (SocketException err)
                {
                    Close();
                    throw new TransportException(uri, "remote hung up unexpectedly", err);
                }

                try
                {
                    readAdvertisedRefs();
                }
                catch (NoRemoteRepositoryException notFound)
                {
                    throw instance.cleanNotFound(notFound);
                }
            }
コード例 #4
0
            public SshFetchConnection(TransportGitSsh instance)
                : base(instance)
            {
                try
                {
                    _channel = instance.Exec(instance.OptionUploadPack);

                    if (_channel.isConnected())
                        init(_channel.getInputStream(), _channel.getOutputStream());
                    else
                        throw new TransportException(uri, instance._errStream.ToString());
                }
                catch (TransportException)
                {
                    Close();
                    throw;
                }
                catch (SocketException err)
                {
                    Close();
                    throw new TransportException(uri, "remote hung up unexpectedly", err);
                }

                try
                {
                    readAdvertisedRefs();
                }
                catch (NoRemoteRepositoryException notFound)
                {
                    Close();
                    instance.checkExecFailure(_exitStatus, instance.OptionUploadPack);
                    throw instance.cleanNotFound(notFound);
                }
            }