@eskimo Thanks for the reply.
Here are the successful print statements:
The Initial Send does not send a color, it just sends some data like a String message :
print("Sent") // successful
After the Initial Send sends the message and it is first received, I didn't add a print statement for a successful reception but the code inside Receive data and send Echo response is successful, specifically
if let data = data, !data.isEmpty { // successful only once }
Inside there, the data that is decoded, only has the String message from above, the color isn't sent yet so the colorData decoding is skipped. However once the String message is received, I send an echo with the colorData
connection.send(content: colorData, ... { }
Inside the completionHandler of the echo, this print statement always runs:
print("Color data sent") // successful
At that point the other device, the Receive Data receives nothing, there isn't a response whatsoever. Nothing prints, it's as if the connection got cut off after the first reception. I put breakpoints everywhere but none of them get hit.