mirror of
https://github.com/ntop/n2n.git
synced 2024-09-19 16:41:11 +02:00
It appears that supernode_disconnect() might only be called in the original code in the TCP case, so add that test - even though the function appear to work in either caes
This commit is contained in:
parent
9e98023a3f
commit
24c1569c88
|
@ -1063,9 +1063,19 @@ static ssize_t sendto_fd (n2n_edge_t *eee, const void *buf,
|
||||||
* if the sendto had an error
|
* if the sendto had an error
|
||||||
*/
|
*/
|
||||||
err_out:
|
err_out:
|
||||||
|
if(eee->conf.connect_tcp) {
|
||||||
supernode_disconnect(eee);
|
supernode_disconnect(eee);
|
||||||
eee->sn_wait = 1;
|
eee->sn_wait = 1;
|
||||||
traceEvent(TRACE_DEBUG, "error in sendto_fd");
|
traceEvent(TRACE_DEBUG, "error in sendto_fd");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If we got an error and are using UDP, this is still an error
|
||||||
|
* case. The only caller of sendto_fd() checks the return only
|
||||||
|
* in the TCP case.
|
||||||
|
*
|
||||||
|
* Thus, we can safely return an error code for any error.
|
||||||
|
*/
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user