mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-04 11:15:07 +03:00 
			
		
		
		
	fix issue with sessions dying and never being fixed
This commit is contained in:
		
							parent
							
								
									cab4b5f793
								
							
						
					
					
						commit
						4b56849b08
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		| 
						 | 
					@ -274,6 +274,10 @@ func (c *Conn) Write(b []byte) (bytesWritten int, err error) {
 | 
				
			||||||
			c.writebuf = c.writebuf[1:]
 | 
								c.writebuf = c.writebuf[1:]
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		return len(b), nil
 | 
							return len(b), nil
 | 
				
			||||||
 | 
						} else {
 | 
				
			||||||
 | 
							// This triggers some session keepalive traffic
 | 
				
			||||||
 | 
							// FIXME this desparately needs to be refactored, since the ping case needlessly goes through the router goroutine just to have it pass a function to the session worker when it determines that a session already exists.
 | 
				
			||||||
 | 
							c.core.router.doAdmin(c.startSearch)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	var packet []byte
 | 
						var packet []byte
 | 
				
			||||||
	done := make(chan struct{})
 | 
						done := make(chan struct{})
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue