|  | @@ -227,7 +227,7 @@ func (this *SendingQueue) Len() uint32 {
 | 
											
												
													
														|  |  }
 |  |  }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  type SendingWorker struct {
 |  |  type SendingWorker struct {
 | 
											
												
													
														|  | -	sync.Mutex
 |  | 
 | 
											
												
													
														|  | 
 |  | +	sync.RWMutex
 | 
											
												
													
														|  |  	conn                *Connection
 |  |  	conn                *Connection
 | 
											
												
													
														|  |  	window              *SendingWindow
 |  |  	window              *SendingWindow
 | 
											
												
													
														|  |  	queue               *SendingQueue
 |  |  	queue               *SendingQueue
 | 
											
										
											
												
													
														|  | @@ -347,9 +347,19 @@ func (this *SendingWorker) Write(seg Segment) {
 | 
											
												
													
														|  |  }
 |  |  }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  func (this *SendingWorker) PingNecessary() bool {
 |  |  func (this *SendingWorker) PingNecessary() bool {
 | 
											
												
													
														|  | 
 |  | +	this.RLock()
 | 
											
												
													
														|  | 
 |  | +	defer this.RUnlock()
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |  	return this.updated
 |  |  	return this.updated
 | 
											
												
													
														|  |  }
 |  |  }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | 
 |  | +func (this *SendingWorker) MarkPingNecessary(b bool) {
 | 
											
												
													
														|  | 
 |  | +	this.Lock()
 | 
											
												
													
														|  | 
 |  | +	defer this.Unlock()
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +	this.updated = b
 | 
											
												
													
														|  | 
 |  | +}
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |  func (this *SendingWorker) OnPacketLoss(lossRate uint32) {
 |  |  func (this *SendingWorker) OnPacketLoss(lossRate uint32) {
 | 
											
												
													
														|  |  	if !effectiveConfig.Congestion || this.conn.roundTrip.Timeout() == 0 {
 |  |  	if !effectiveConfig.Congestion || this.conn.roundTrip.Timeout() == 0 {
 | 
											
												
													
														|  |  		return
 |  |  		return
 |