Skip to content

Commit

Permalink
Since already have a default implementation of timeout in IStream, re…
Browse files Browse the repository at this point in the history
…move unused override
  • Loading branch information
Coldwings committed Sep 10, 2024
1 parent e86d55a commit 3bc4603
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 26 deletions.
15 changes: 0 additions & 15 deletions common/memory-stream/memory-stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ class SimplexMemoryStream final : public IStream
if (closed) return -1;
return m_ringbuf.writev(iov, iovcnt);
}
virtual uint64_t timeout() const override
{
return -1;
}
virtual void timeout(uint64_t) override {}
};

class DuplexMemoryStreamImpl : public DuplexMemoryStream
Expand Down Expand Up @@ -96,11 +91,6 @@ class DuplexMemoryStreamImpl : public DuplexMemoryStream
if (closed) return -1;
return s2->writev(iov, iovcnt);
}
virtual uint64_t timeout() const override
{
return -1;
}
virtual void timeout(uint64_t) override {}
};

EndPoint epa, epb;
Expand Down Expand Up @@ -206,11 +196,6 @@ class FaultStream : public IStream
return m_stream->writev(iov, iovcnt);
}

virtual uint64_t timeout() const override
{
return -1;
}
virtual void timeout(uint64_t) override {}
};

IStream* new_fault_stream(IStream* stream, int flag, bool ownership) {
Expand Down
4 changes: 0 additions & 4 deletions fs/filesystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,6 @@ namespace fs
UNIMPLEMENTED(int sync_file_range(off_t offset, off_t nbytes, unsigned int flags));
UNIMPLEMENTED(int fallocate(int mode, off_t offset, off_t len));
UNIMPLEMENTED(int fiemap(struct fiemap* map)); // query the extent map for
UNIMPLEMENTED(uint64_t timeout() const override);
void timeout(uint64_t tm) override {
// unimplemented by default
}

// append write to the file
// if `offset` is specified, it must be equal to current size of the
Expand Down
7 changes: 0 additions & 7 deletions net/http/body.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,6 @@ class BodyReadStream : public ROStream {
return ret;
}

virtual uint64_t timeout() const override {
return m_stream ? m_stream->timeout() : -1UL;
}
virtual void timeout(uint64_t timeout) override {
if (m_stream) m_stream->timeout(timeout);
}

protected:
net::ISocketStream *m_stream;
char* m_partial_body_buf;
Expand Down

0 comments on commit 3bc4603

Please sign in to comment.