Use session copying in state/ports.go