diff options
| -rw-r--r-- | proxy.c | 4 |
1 files changed, 3 insertions, 1 deletions
| @@ -366,8 +366,10 @@ static void handle_read( int64 peersocket ) { | |||
| 366 | /* See, if we already have a connection to that peer */ | 366 | /* See, if we already have a connection to that peer */ |
| 367 | for( i=0; i<MAX_PEERS; ++i ) | 367 | for( i=0; i<MAX_PEERS; ++i ) |
| 368 | if( ( g_connections[i].state & FLAG_MASK ) == FLAG_CONNECTED && | 368 | if( ( g_connections[i].state & FLAG_MASK ) == FLAG_CONNECTED && |
| 369 | g_connections[i].tracker_id == tracker_id ) | 369 | g_connections[i].tracker_id == tracker_id ) { |
| 370 | fprintf( stderr, "Peer already connected. Closing connection.\n" ); | ||
| 370 | goto close_socket; | 371 | goto close_socket; |
| 372 | } | ||
| 371 | 373 | ||
| 372 | /* Also no need for soliloquy */ | 374 | /* Also no need for soliloquy */ |
| 373 | if( tracker_id == g_tracker_id ) | 375 | if( tracker_id == g_tracker_id ) |
