added more debugging messages

This commit is contained in:
jmjatlanta 2017-08-03 17:51:34 -05:00
parent 3cc75058f0
commit 46b6921ddf
2 changed files with 4 additions and 3 deletions

View file

@ -105,9 +105,11 @@ int ipfs_multistream_marshal(const unsigned char* incoming, size_t incoming_size
libp2p_logger_log("null", LOGLEVEL_DEBUG, "kademlia message handled\n");
} else if (protocol_compare(incoming, incoming_size, "/ipfs/bitswap/")) {
libp2p_logger_debug("null", "Attempting bitswap connection...\n");
if (!ipfs_bitswap_network_handle_message(local_node, session, incoming, incoming_size))
if (!ipfs_bitswap_network_handle_message(local_node, session, incoming, incoming_size)) {
libp2p_logger_error("null", "Bitswap message handler reported a failure.\n");
return -1;
}
}
else {
libp2p_logger_error("null", "There was a problem with this connection. It is nothing I can handle. Disconnecting.\n");
return -1;

View file

@ -101,8 +101,7 @@ void* ipfs_bitswap_engine_peer_request_processor_start(void* ctx) {
did_some_processing = 1;
if (retVal == -1) {
// there was a problem. Clean up
current_peer_entry->connection_type = CONNECTION_TYPE_NOT_CONNECTED;
libp2p_session_context_free(current_peer_entry->sessionContext);
libp2p_peer_handle_connection_error(current_peer_entry);
}
}
}