added login and permission fix
This commit is contained in:
@@ -272,6 +272,7 @@ func (um *UseManager) tunnelReadLoop(tunnel *useTunnel) {
|
||||
}
|
||||
|
||||
if err := um.client.SendTunnelData(tunnel.id, buf[:n]); err != nil {
|
||||
log.Printf("[use] tunnel send error: %v", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -326,11 +327,17 @@ func (um *UseManager) handleTunnelData(tunnelID string, data []byte) {
|
||||
um.mu.RUnlock()
|
||||
|
||||
if !exists {
|
||||
log.Printf("[use] tunnel data for unknown tunnel %s (%d bytes)", tunnelID[:8], len(data))
|
||||
return
|
||||
}
|
||||
|
||||
// Write to the tunnel socket (relay -> VHCI)
|
||||
tunnel.conn.Write(data)
|
||||
n, err := tunnel.conn.Write(data)
|
||||
if err != nil {
|
||||
log.Printf("[use] tunnel write error: %v", err)
|
||||
} else if n != len(data) {
|
||||
log.Printf("[use] tunnel short write: %d/%d", n, len(data))
|
||||
}
|
||||
}
|
||||
|
||||
func (um *UseManager) handleClientLeft(msg *protocol.ClientLeft) {
|
||||
|
||||
Reference in New Issue
Block a user