diff --git a/NearbyShare/InboundNearbyConnection.swift b/NearbyShare/InboundNearbyConnection.swift index 8e7e281..53e164e 100644 --- a/NearbyShare/InboundNearbyConnection.swift +++ b/NearbyShare/InboundNearbyConnection.swift @@ -69,11 +69,9 @@ class InboundNearbyConnection: NearbyConnection{ try decryptAndProcessReceivedSecureMessage(smsg) } }catch{ - lastError=error - log("Deserialization error: \(error) in state \(currentState)") -#if !DEBUG - protocolError() -#endif + lastError = error + log("Deserialization error: \(error) in state \(currentState). Payload: \(frameData.hex)") + //protocolError() } } @@ -555,3 +553,9 @@ public class SaveFilesManager { } } } + +extension Data { + var hex: String { + return map { String(format: "%02hhx", $0) }.joined() + } +}