File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -160,7 +160,6 @@ Private Const NCRYPT_ALLOW_PLAINTEXT_EXPORT_FLAG As Long = &H2
160160'--- errors
161161Private Const WSAENOTCONN As Long = 10057
162162Private Const ERR_TIMEOUT As Long = &H800705B4
163- Private Const INVALID_SOCKET As Long = -1
164163
165164Private Declare Sub CopyMemory Lib "kernel32 " Alias "RtlMoveMemory " (Destination As Any , Source As Any , ByVal Length As Long )
166165Private Declare Function IsBadReadPtr Lib "kernel32 " (ByVal lp As Long , ByVal ucb As Long ) As Long
@@ -552,7 +551,7 @@ Public Property Get IsClosed() As Boolean
552551 If m_bUseTls Then
553552 IsClosed = TlsIsClosed(m_uCtx) Or TlsIsShutdown(m_uCtx)
554553 Else
555- IsClosed = ( m_oSocket.SocketHandle = INVALID_SOCKET)
554+ IsClosed = m_oSocket.IsClosed
556555 End If
557556End Property
558557
@@ -1097,6 +1096,11 @@ Public Function Create( _
10971096 Optional ByVal SocketType As UcsAsyncSocketTypeEnum = ucsSckStream, _
10981097 Optional ByVal EventMask As UcsAsyncSocketEventMaskEnum = ucsSfdAll, _
10991098 Optional SocketAddress As String ) As Boolean
1099+ If m_bUseTls Then
1100+ If IsClosed And Not m_oSocket.IsClosed Then
1101+ m_oSocket.Close_
1102+ End If
1103+ End If
11001104 Create = m_oSocket.Create(SocketPort, SocketType, EventMask, SocketAddress)
11011105End Function
11021106
You can’t perform that action at this time.
0 commit comments