mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-04 03:05:07 +03:00 
			
		
		
		
	don't drop send/recv traffic going through the crypto workers, just block until they're free (TODO run further tests to make sure this doesn't cycle/deadlock)
This commit is contained in:
		
							parent
							
								
									e113b8d530
								
							
						
					
					
						commit
						ddc4773b19
					
				
					 1 changed files with 2 additions and 10 deletions
				
			
		| 
						 | 
					@ -170,11 +170,7 @@ func (r *router) sendPacket(bs []byte) {
 | 
				
			||||||
			// Don't continue - drop the packet
 | 
								// Don't continue - drop the packet
 | 
				
			||||||
			return
 | 
								return
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		select {
 | 
							sinfo.send <- bs
 | 
				
			||||||
		case sinfo.send <- bs:
 | 
					 | 
				
			||||||
		default:
 | 
					 | 
				
			||||||
			util_putBytes(bs)
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -225,11 +221,7 @@ func (r *router) handleTraffic(packet []byte) {
 | 
				
			||||||
		return
 | 
							return
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	//go func () { sinfo.recv<-&p }()
 | 
						//go func () { sinfo.recv<-&p }()
 | 
				
			||||||
	select {
 | 
						sinfo.recv <- &p
 | 
				
			||||||
	case sinfo.recv <- &p:
 | 
					 | 
				
			||||||
	default:
 | 
					 | 
				
			||||||
		util_putBytes(p.payload)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (r *router) handleProto(packet []byte) {
 | 
					func (r *router) handleProto(packet []byte) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue