mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-03 18:55:08 +03:00 
			
		
		
		
	Revert "Force packets through the switch to be buffered (seems to help the reordering problem on Windows)"
This reverts commit 837e7da792.
			
			
This commit is contained in:
		
							parent
							
								
									328dd6c054
								
							
						
					
					
						commit
						ad8d30ce74
					
				
					 1 changed files with 2 additions and 8 deletions
				
			
		| 
						 | 
					@ -718,14 +718,8 @@ func (t *switchTable) _handleIn(packet []byte, idle map[switchPort]struct{}, sen
 | 
				
			||||||
	if best != nil {
 | 
						if best != nil {
 | 
				
			||||||
		if _, isIdle := idle[best.elem.port]; isIdle {
 | 
							if _, isIdle := idle[best.elem.port]; isIdle {
 | 
				
			||||||
			delete(idle, best.elem.port)
 | 
								delete(idle, best.elem.port)
 | 
				
			||||||
 | 
								ports[best.elem.port].sendPacketsFrom(t, [][]byte{packet})
 | 
				
			||||||
			// FIXME: This was causing the out-of-order packets on Windows but forcing
 | 
								return true
 | 
				
			||||||
			// all packets to buffer might have a mild performance penalty
 | 
					 | 
				
			||||||
			//ports[best.elem.port].sendPacketsFrom(t, [][]byte{packet})
 | 
					 | 
				
			||||||
			//return true
 | 
					 | 
				
			||||||
			t.Act(nil, func() {
 | 
					 | 
				
			||||||
				t._idleIn(best.elem.port)
 | 
					 | 
				
			||||||
			})
 | 
					 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	// Didn't find anyone idle to send it to
 | 
						// Didn't find anyone idle to send it to
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue