#6443 wait for handshake to be done before closing the socket
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
This commit is contained in:
parent
92b6f336b6
commit
e1daaed90b
|
@ -329,7 +329,7 @@ public class SslBytesServerTest extends SslBytesTest
|
|||
|
||||
final SSLSocket client2 = newClient(proxy);
|
||||
|
||||
threadPool.submit(() ->
|
||||
Future<Object> handshakeFuture = threadPool.submit(() ->
|
||||
{
|
||||
client2.startHandshake();
|
||||
return null;
|
||||
|
@ -361,6 +361,9 @@ public class SslBytesServerTest extends SslBytesTest
|
|||
// Client Done
|
||||
TLSRecord doneRecord = proxy.readFromClient();
|
||||
assertNotNull(doneRecord);
|
||||
|
||||
// Wait for socket to be done with handshake
|
||||
handshakeFuture.get(5, TimeUnit.SECONDS);
|
||||
// Close
|
||||
client2.close();
|
||||
TLSRecord closeRecord = proxy.readFromClient();
|
||||
|
|
Loading…
Reference in New Issue