Skip to content

Commit

Permalink
Merge branch 'release/1.0' of github.com:AntelopeIO/spring into gh_778
Browse files Browse the repository at this point in the history
  • Loading branch information
greg7mdp committed Sep 16, 2024
2 parents 3c417b1 + ea7fe7c commit e2a7a72
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
7 changes: 5 additions & 2 deletions libraries/libfc/include/fc/io/random_access_file.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,17 @@ struct random_access_file_context {

ssize_t wrote = -1;
do {
if(offs == append_t)
if(offs == append_t) {
#ifdef __linux__
wrote = pwritev2(fd, iov, i, 0, RWF_APPEND); //linux *not* opened with O_APPEND, appending requires special flag
if(wrote == -1 && errno == EOPNOTSUPP) //fallback for kernels before 4.16
wrote = pwritev(fd, iov, i, size());
#else
wrote = writev(fd, iov, i); //opened with O_APPEND, just write
#endif
else
} else {
wrote = pwritev(fd, iov, i, offs);
}
} while(wrote == -1 && errno == EINTR);
FC_ASSERT(wrote != -1, "write failure on file ${fn}: ${e}", ("fn", display_path)("e", strerror(errno)));

Expand Down
10 changes: 0 additions & 10 deletions plugins/net_plugin/net_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -553,14 +553,6 @@ namespace eosio {
void start_expire_timer();
void start_monitors();

// we currently pause on snapshot generation
void wait_if_paused() const {
controller& cc = chain_plug->chain();
while (cc.is_writing_snapshot()) {
std::this_thread::sleep_for(std::chrono::milliseconds(10));
}
}

void expire();
/** \name Peer Timestamps
* Time message handling
Expand Down Expand Up @@ -2938,8 +2930,6 @@ namespace eosio {
return;
}

my_impl->wait_if_paused();

boost::asio::async_read( *socket,
pending_message_buffer.get_buffer_sequence_for_boost_async_read(), completion_handler,
boost::asio::bind_executor( strand,
Expand Down

0 comments on commit e2a7a72

Please sign in to comment.