I've implemented a VPN app with Packet Tunnel Provider for macOS.
To send the packets, I'm using BSD sockets.
I noticed that when sending big files (1GB), in most of the time the uploading fails, and the relevant errors I see at the console are the following errors:
[Extension com.myExtension]: IPC detached
NESMVPNSession[Primary Tunnel:My Company - myUserName:6EF9650B-D1DA-418B-B617-AE0874DDCBD3:(null)] in state
NESMVPNSessionStateRunning: plugin NEVPNTunnelPlugin(com.MyContainingApp]) did detach from IPC
[NOTICE] : networking grace period is over for #lifetime
boringssl_context_message_handler(2257) [C6.1:2][0x1048aeac0] Writing SSL3_RT_ALERT 2 bytes
boringssl_context_handle_warning_alert(1892) [C6.1:2][0x1048aeac0] write alert, level: warning, description: close notify
boringssl_session_disconnect(539) [C6.1:2][0x1048aeac0] SSL_shutdown 0
nw_flow_disconnected [C6.1 20.185.73.23:443 cancelled socket-flow ((null))] Output protocol disconnected
nw_connection_report_state_with_handler_on_nw_queue [C6] reporting state cancelled
Connection 6: destroyed
nw_protocol_boringssl_remove_input_handler(1012) [C6.1:2][0x1048aeac0] nw_protocol_boringssl_remove_input_handler forced true
nw_protocol_boringssl_remove_input_handler(1030) [C6.1:2][0x1048aeac0] Transferring nw_protocol_boringssl_t handle back into ARC for autorelease
So I'm guessing it's related to "did detach from IPC" or to "SSL3_RT_ALERT 2 bytes", but what's the next step here? How can I try to figure out what's causing this?
P.S: It seems that the VPN stays connected and functional, it's just the uploading that fails.