mirror of
git://erdgeist.org/opentracker
synced 2025-02-17 06:31:30 +08:00
Report connection duplication
This commit is contained in:
parent
ed1673eb10
commit
9cced7eb88
4
proxy.c
4
proxy.c
@ -366,8 +366,10 @@ static void handle_read( int64 peersocket ) {
|
|||||||
/* See, if we already have a connection to that peer */
|
/* See, if we already have a connection to that peer */
|
||||||
for( i=0; i<MAX_PEERS; ++i )
|
for( i=0; i<MAX_PEERS; ++i )
|
||||||
if( ( g_connections[i].state & FLAG_MASK ) == FLAG_CONNECTED &&
|
if( ( g_connections[i].state & FLAG_MASK ) == FLAG_CONNECTED &&
|
||||||
g_connections[i].tracker_id == tracker_id )
|
g_connections[i].tracker_id == tracker_id ) {
|
||||||
|
fprintf( stderr, "Peer already connected. Closing connection.\n" );
|
||||||
goto close_socket;
|
goto close_socket;
|
||||||
|
}
|
||||||
|
|
||||||
/* Also no need for soliloquy */
|
/* Also no need for soliloquy */
|
||||||
if( tracker_id == g_tracker_id )
|
if( tracker_id == g_tracker_id )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user