burakoner/OKEx.Net

auth reconnect bug

polariseye opened this issue · 2 comments

connection will not authenticate when connection reconnected.the origin code is bellow

 protected virtual async Task<CallResult<bool>> OkexAuthenticateSocket(SocketConnection s)
        {
            // Check Point
            if (s.Authenticated)
                return new CallResult<bool>(true, null);

            // Check Point
            if (Key == null || Secret == null || PassPhrase == null)
                return new CallResult<bool>(false, new NoApiCredentialsError());

because the package CryptoExchange.net will not set Authenticated=false.that's say Authenticated is awalys true..
we can also think, the field Authenticated just say the connection need auth

the fix method is just delete the code

// if (s.Authenticated)
 //               return new CallResult<bool>(true, null);

Thanks for feedback. I'm fizing it now