Skip to content

Commit a4a5480

Browse files
author
Zhen Li
authored
Merge pull request #253 from zhenlineo/1.0-ssl-error-message
Better error message when failed to read more data from ssl socket
2 parents 0e85e1b + 2236da6 commit a4a5480

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

driver/src/main/java/org/neo4j/driver/internal/connector/socket/TLSSocketChannel.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,8 @@ private HandshakeStatus unwrap( ByteBuffer buffer ) throws IOException
176176
*/
177177
if ( channel.read( cipherIn ) < 0 )
178178
{
179-
throw new ClientException( "Failed to establish SSL socket connection." );
179+
throw new ClientException( "SSL Connection terminated while receiving data. " +
180+
"This can happen due to network instabilities, or due to restarts of the database." );
180181
}
181182
cipherIn.flip();
182183

0 commit comments

Comments
 (0)