BlueSocket
BlueSocket copied to clipboard
SIGSEGV: invalid address
Sometimes got Segmentation fault crash:
* thread #11, name = 'NIO-ELT-#2', stop reason = signal SIGSEGV: invalid address (fault address: 0x0)
frame #0: 0x0000555555d45728 Run`Socket.connect(host="X.X.X.X", port=25, timeout=10000, familyOnly=false, self=<unavailable>) at Socket.swift:1890:20
1887
1888 self.isConnected = true
1889 var address: Address
-> 1890 if info!.pointee.ai_family == Int32(AF_INET6) {
1891
1892 var addr = sockaddr_in6()
1893 memcpy(&addr, info!.pointee.ai_addr, Int(MemoryLayout<sockaddr_in6>.size))
Ubuntu 18.04, Swift 5.0.3