Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #5097 from greymass/net-unexpected-peer
Browse files Browse the repository at this point in the history
Log which peer gives unexpected length messages
  • Loading branch information
heifner authored Aug 9, 2018
2 parents 53e8a11 + 0a49ff6 commit 1b6e5ea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/net_plugin/net_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2122,7 +2122,8 @@ namespace eosio {
auto index = conn->pending_message_buffer.read_index();
conn->pending_message_buffer.peek(&message_length, sizeof(message_length), index);
if(message_length > def_send_buffer_size*2 || message_length == 0) {
elog("incoming message length unexpected (${i})", ("i", message_length));
boost::system::error_code ec;
elog("incoming message length unexpected (${i}), from ${p}", ("i", message_length)("p",boost::lexical_cast<std::string>(conn->socket->remote_endpoint(ec))));
close(conn);
return;
}
Expand Down

0 comments on commit 1b6e5ea

Please sign in to comment.