summaryrefslogtreecommitdiff
path: root/src/AbstractCommand.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-10-02 10:12:10 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-10-02 10:12:10 +0000
commit7375a778c4ad3acda07b138d8530974df490be29 (patch)
treeeeccdf18bd64ee163647d3a258505e30ce1f8819 /src/AbstractCommand.h
parent86d4d1963a58e80642ef6e5986da54f68aa08b30 (diff)
2010-10-02 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug that FtpFinishDownloadCommand does not handle timeout. This means it waits for the remote server to send "226 Transfer Complete" message *without* its own timeout until the remote server shutdowns connection(we can detect EOF in this case). * src/AbstractCommand.h * src/FtpFinishDownloadCommand.cc
Diffstat (limited to 'src/AbstractCommand.h')
-rw-r--r--src/AbstractCommand.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/AbstractCommand.h b/src/AbstractCommand.h
index 810ba487..9014c277 100644
--- a/src/AbstractCommand.h
+++ b/src/AbstractCommand.h
@@ -174,6 +174,11 @@ protected:
*/
void setWriteCheckSocketIf(const SharedHandle<SocketCore>& socket, bool pred);
+ time_t getTimeout() const
+ {
+ return timeout_;
+ }
+
void setTimeout(time_t timeout) { timeout_ = timeout; }
void prepareForNextAction
@@ -222,6 +227,11 @@ protected:
{
return requestGroup_->getPieceStorage();
}
+
+ Timer& getCheckPoint()
+ {
+ return checkPoint_;
+ }
public:
AbstractCommand
(cuid_t cuid, const SharedHandle<Request>& req,