[fix] close sockets on process exit