Show
Ignore:
Timestamp:
10/28/09 02:24:58 (9 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1256696698 +0000
git-parent:

[44ff3960c287fb9db5673a83f1165dfe9a8ae96e]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1256696698 +0000
Message:

only allow one postponed iep reconnect at a time

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/stratcon_iep.c

    r44ff396 r8bc0f31  
    5959eventer_jobq_t iep_jobq; 
    6060static noit_log_stream_t noit_iep = NULL; 
     61static noit_spinlock_t iep_conn_cnt = 0; 
    6162 
    6263struct iep_thread_driver { 
     
    419420setup_iep_connection_callback(eventer_t e, int mask, void *closure, 
    420421                              struct timeval *now) { 
     422  noit_spinlock_unlock(&iep_conn_cnt); 
    421423  stratcon_iep_line_processor(DS_OP_INSERT, NULL, NULL, NULL, NULL); 
    422424  return 0; 
     
    425427static void 
    426428setup_iep_connection_later(int seconds) { 
    427   eventer_t newe = eventer_alloc(); 
     429  eventer_t newe; 
     430  if(!noit_spinlock_trylock(&iep_conn_cnt)) return; 
     431  newe = eventer_alloc(); 
    428432  gettimeofday(&newe->whence, NULL); 
    429433  newe->whence.tv_sec += seconds;