forked from yuxh/gearman-go
		
	retrun data slice with correct index
This commit is contained in:
		
							parent
							
								
									36ba74f0dc
								
							
						
					
					
						commit
						af47a3228f
					
				@ -144,7 +144,7 @@ func (a *agent) unpack(data []byte) ([]byte, int, bool) {
 | 
			
		||||
                return data, common.PACKET_LEN, true
 | 
			
		||||
            } else if total < tl { // data[:total] is what we want, data[total:] is the more
 | 
			
		||||
                a.in <- data[total:]
 | 
			
		||||
                data = data[:total]
 | 
			
		||||
                data = data[start:total]
 | 
			
		||||
                return data, common.PACKET_LEN, true
 | 
			
		||||
            } else { // ops! It won't be possible.
 | 
			
		||||
                return nil, total - tl, false
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user