Skip to content

Commit

Permalink
Merge pull request EOSIO#104 from enumivo/staging
Browse files Browse the repository at this point in the history
merge from eosio master
  • Loading branch information
Enumivo authored May 15, 2018
2 parents 7b9622a + 19360d4 commit 6287971
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion contracts/enumivolib/privileged.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ extern "C" {

void set_privileged( account_name account, bool is_priv );

void set_blockchain_parameters_packed(char* data, uint32_t datalen);
void set_blockchain_parameters_packed(char* data, uint32_t datalen);

/**
* Retrieve the blolckchain parameters
Expand Down
17 changes: 8 additions & 9 deletions plugins/net_plugin/net_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -453,20 +453,19 @@ namespace eosio {
};
deque<queued_write> write_queue;
deque<queued_write> out_queue;

fc::sha256 node_id;
handshake_message last_handshake_recv;
handshake_message last_handshake_sent;
int16_t sent_handshake_count;
bool connecting;
bool syncing;
uint16_t protocol_version;
int16_t sent_handshake_count = 0;
bool connecting = false;
bool syncing = false;
uint16_t protocol_version = 0;
string peer_addr;
unique_ptr<boost::asio::steady_timer> response_expected;
optional<request_message> pending_fetch;
go_away_reason no_retry;
go_away_reason no_retry = no_reason;
block_id_type fork_head;
uint32_t fork_head_num;
uint32_t fork_head_num = 0;
optional<request_message> last_req;

connection_status get_status()const {
Expand Down Expand Up @@ -947,12 +946,12 @@ namespace eosio {
bool trigger_send,
std::function<void(boost::system::error_code, std::size_t)> callback) {
write_queue.push_back({buff, callback});
if(write_queue.size() == 1 && trigger_send)
if(out_queue.empty() && trigger_send)
do_queue_write();
}

void connection::do_queue_write() {
if(write_queue.empty())
if(write_queue.empty() || !out_queue.empty())
return;
connection_wptr c(shared_from_this());
if(!socket->is_open()) {
Expand Down

0 comments on commit 6287971

Please sign in to comment.