The networking stack on the Mac should work independently of whether a user is logged in.
I think so, too but I have no clue why it works always when called manually vs. automatically.
It looks like you’re using SwiftNIO for your networking. Are you use Network framework under the covers? That is, are you using NIO Transport Services?
Yes. I use SwiftNIO 2.35.0 for my Mailer class which is based on SwiftSMTP.
But even when there is a SwiftNIO issue the shell call using sshfs to mount a remote volume should work still work…
I wonder if there is a security issue. The deamon process is called as admin user
<key>UserName</key>
<string>admin</string>
<key>GroupName</key>
<string>admin</string>
and this works as expected. I checked this via ProcessInfo().userName debug output.
Edit:
AFAIK I don't use NIOTransportServices although the package is included in projects package list. A source search for NIOTransportServices gave no hit.