mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-04 03:05:07 +03:00 
			
		
		
		
	minor allocation fix
This commit is contained in:
		
							parent
							
								
									6cb0ed91ad
								
							
						
					
					
						commit
						d795ab1b65
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		| 
						 | 
					@ -44,6 +44,7 @@ func (s *stream) writeMsg(bs []byte) (int, error) {
 | 
				
			||||||
	padLen := len(buf[0]) + len(buf[1])
 | 
						padLen := len(buf[0]) + len(buf[1])
 | 
				
			||||||
	buf = append(buf, bs)
 | 
						buf = append(buf, bs)
 | 
				
			||||||
	totalLen := padLen + len(bs)
 | 
						totalLen := padLen + len(bs)
 | 
				
			||||||
 | 
						s.outputBuffer = buf[:0] // So we can reuse the same underlying array later
 | 
				
			||||||
	var bn int
 | 
						var bn int
 | 
				
			||||||
	for bn < totalLen {
 | 
						for bn < totalLen {
 | 
				
			||||||
		n, err := buf.WriteTo(s.rwc)
 | 
							n, err := buf.WriteTo(s.rwc)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue