Skip to content

Commit

Permalink
Add timeout to SSH Agent streams
Browse files Browse the repository at this point in the history
droidmonkey committed Nov 10, 2024
1 parent d03ffc2 commit 6e81451
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions src/sshagent/BinaryStream.cpp
Original file line number Diff line number Diff line change
@@ -21,14 +21,12 @@

BinaryStream::BinaryStream(QIODevice* device)
: QObject(device)
, m_timeout(-1)
, m_device(device)
{
}

BinaryStream::BinaryStream(QByteArray* ba, QObject* parent)
: QObject(parent)
, m_timeout(-1)
{
m_buffer.reset(new QBuffer(ba));
m_buffer->open(QIODevice::ReadWrite);
2 changes: 1 addition & 1 deletion src/sshagent/BinaryStream.h
Original file line number Diff line number Diff line change
@@ -55,7 +55,7 @@ class BinaryStream : QObject
bool write(const char* ptr, qint64 len);

private:
int m_timeout;
int m_timeout = 3000;
QString m_error;
QIODevice* m_device;
QScopedPointer<QBuffer> m_buffer;

0 comments on commit 6e81451

Please sign in to comment.