Browse Source

conditionally downgraded one ERROR msg to DEBUG msg (#725)

pull/728/head
Logan oos Even 3 years ago
committed by GitHub
parent
commit
1f51aa1d5c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      src/edge_utils.c

9
src/edge_utils.c

@ -934,10 +934,19 @@ static ssize_t sendto_fd (n2n_edge_t *eee, const void *buf,
if((sent <= 0) && (errno)) { if((sent <= 0) && (errno)) {
char * c = strerror(errno); char * c = strerror(errno);
// downgrade to TRACE_DEBUG in case of custom AF_INVALID, i.e. supernode not resolved yet
if(errno == EAFNOSUPPORT /* 93 */) {
traceEvent(TRACE_DEBUG, "sendto_fd sendto failed (%d) %s", errno, c);
#ifdef WIN32
traceEvent(TRACE_DEBUG, "sendto_fd WSAGetLastError(): %u", WSAGetLastError());
#endif
} else {
traceEvent(TRACE_ERROR, "sendto_fd sendto failed (%d) %s", errno, c); traceEvent(TRACE_ERROR, "sendto_fd sendto failed (%d) %s", errno, c);
#ifdef WIN32 #ifdef WIN32
traceEvent(TRACE_ERROR, "sendto_fd WSAGetLastError(): %u", WSAGetLastError()); traceEvent(TRACE_ERROR, "sendto_fd WSAGetLastError(): %u", WSAGetLastError());
#endif #endif
}
if(eee->conf.connect_tcp) { if(eee->conf.connect_tcp) {
supernode_disconnect(eee); supernode_disconnect(eee);
eee->sn_wait = 1; eee->sn_wait = 1;

Loading…
Cancel
Save