Fix bug when sync() in AsyncSslSocket could be called after socket has been closed
/*
- * Copyright (C) 2015 SoftIndex LLC.
+ * Copyright (C) 2015-2018 SoftIndex LLC.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -282,6 +282,7 @@ public final class AsyncSslSocket implements AsyncTcpSocket, AsyncTcpSocket.Even
}
private void sync() {
+ if (net2engine == null) return;
syncPosted = false;
try {
doSync();
