Re-fix #2140 that the completionHanlder when reading data from stream was called in loop
Re-fix #2140 that the completionHanlder when reading data from stream was called in loop

Detect if the data has zero length and atEOF is true, then close the socket with kWebSocketCloseProtocolError error.

couchbase/couchbase-lite-ios,couchbase/couchbase-lite-ios,couchbase/couchbase-lite-ios,couchbase/couchbase-lite-ios,couchbase/couchbase-lite-ios,couchbase/couchbase-lite-ios