Unverified Commit adca27ab authored by Ola Bini's avatar Ola Bini

Give a different error message when we don't receive any results at all

parent 6d6833f5
......@@ -70,6 +70,10 @@ func getPrekeyResponseFromRealServer(u string, data []byte) ([]byte, error) {
if e != nil {
return nil, e
if len(res) == 0 {
return nil, errors.New("server closed connection without sending any data - this probably happened because of a malformed request")
res2, ss, ok := extractShort(res)
if !ok || uint16(len(res2)) != ss {
return nil, errors.New("unexpected length of data received")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment