See my-devices/sdk@5127d47
Throwing an exception in decodeBufferFull() leaves the internal state of the SecureSocketImpl unchanged. A follow up call to receiveBytes() will do the same again, leading to a potential endless loop. Instead, simply return the error code and let receiveBytes() deal with it.