Skip to content

Commit d67dc23

Browse files
trflynn89awesomekling
authored andcommitted
RequestServer: Fix typo in CacheEntry::close_and_destroy_cache_entry
1 parent 822fcc3 commit d67dc23

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Services/RequestServer/Cache/CacheEntry.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ void CacheEntry::remove()
8585
m_index.remove_entry(m_cache_key);
8686
}
8787

88-
void CacheEntry::close_and_destory_cache_entry()
88+
void CacheEntry::close_and_destroy_cache_entry()
8989
{
9090
m_disk_cache.cache_entry_closed({}, *this);
9191
}
@@ -154,15 +154,15 @@ CacheEntryWriter::CacheEntryWriter(DiskCache& disk_cache, CacheIndex& index, u64
154154
ErrorOr<void> CacheEntryWriter::write_data(ReadonlyBytes data)
155155
{
156156
if (m_marked_for_deletion) {
157-
close_and_destory_cache_entry();
157+
close_and_destroy_cache_entry();
158158
return Error::from_string_literal("Cache entry has been deleted");
159159
}
160160

161161
if (auto result = m_file->write_until_depleted(data); result.is_error()) {
162162
dbgln("\033[31;1mUnable to write to cache entry for\033[0m {}: {}", m_url, result.error());
163163

164164
remove();
165-
close_and_destory_cache_entry();
165+
close_and_destroy_cache_entry();
166166

167167
return result.release_error();
168168
}
@@ -175,7 +175,7 @@ ErrorOr<void> CacheEntryWriter::write_data(ReadonlyBytes data)
175175

176176
ErrorOr<void> CacheEntryWriter::flush()
177177
{
178-
ScopeGuard guard { [&]() { close_and_destory_cache_entry(); } };
178+
ScopeGuard guard { [&]() { close_and_destroy_cache_entry(); } };
179179

180180
if (m_marked_for_deletion)
181181
return Error::from_string_literal("Cache entry has been deleted");
@@ -337,7 +337,7 @@ void CacheEntryReader::pipe_complete()
337337
m_on_pipe_complete(m_bytes_piped);
338338
}
339339

340-
close_and_destory_cache_entry();
340+
close_and_destroy_cache_entry();
341341
}
342342

343343
void CacheEntryReader::pipe_error(Error error)
@@ -351,7 +351,7 @@ void CacheEntryReader::pipe_error(Error error)
351351
if (m_on_pipe_error)
352352
m_on_pipe_error(m_bytes_piped);
353353

354-
close_and_destory_cache_entry();
354+
close_and_destroy_cache_entry();
355355
}
356356

357357
ErrorOr<void> CacheEntryReader::read_and_validate_footer()

Services/RequestServer/Cache/CacheEntry.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class CacheEntry {
6262
protected:
6363
CacheEntry(DiskCache&, CacheIndex&, u64 cache_key, String url, LexicalPath, CacheHeader);
6464

65-
void close_and_destory_cache_entry();
65+
void close_and_destroy_cache_entry();
6666

6767
DiskCache& m_disk_cache;
6868
CacheIndex& m_index;

0 commit comments

Comments
 (0)