mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-04 11:15:07 +03:00 
			
		
		
		
	stop synchronizing message reads for now, not 100% safe but I don't have any better ideas
This commit is contained in:
		
							parent
							
								
									209d2ffea5
								
							
						
					
					
						commit
						99be6b037d
					
				
					 1 changed files with 4 additions and 1 deletions
				
			
		| 
						 | 
					@ -392,7 +392,10 @@ func (intf *linkInterface) handler() error {
 | 
				
			||||||
		msg, err := intf.msgIO.readMsg()
 | 
							msg, err := intf.msgIO.readMsg()
 | 
				
			||||||
		if len(msg) > 0 {
 | 
							if len(msg) > 0 {
 | 
				
			||||||
			// TODO rewrite this if the link becomes an actor
 | 
								// TODO rewrite this if the link becomes an actor
 | 
				
			||||||
			<-intf.peer.SyncExec(func() { intf.peer._handlePacket(msg) })
 | 
								// FIXME this could theoretically send traffic faster than the peer can handle
 | 
				
			||||||
 | 
								//  The alternative is to SyncExec, but that causes traffic to block while *other* links work
 | 
				
			||||||
 | 
								//  Need to figure out why and find a workaround
 | 
				
			||||||
 | 
								intf.peer.handlePacketFrom(nil, msg)
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		if err != nil {
 | 
							if err != nil {
 | 
				
			||||||
			if err != io.EOF {
 | 
								if err != io.EOF {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue