Remove commented logs
This commit is contained in:
parent
14084b9832
commit
f22d4f6ac8
4 changed files with 0 additions and 12 deletions
|
@ -48,16 +48,12 @@ func (r *RPC) HandleRPCMsg(msg *binary.InternalMessage) {
|
||||||
r.client.Logger.Error().Err(decodeErr).Msg("rpc decrypt msg err")
|
r.client.Logger.Error().Err(decodeErr).Msg("rpc decrypt msg err")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
//r.client.Logger.Debug().Any("byteLength", len(data)).Any("unmarshaled", response).Any("raw", string(data)).Msg("RPC Msg")
|
|
||||||
if response == nil {
|
if response == nil {
|
||||||
r.client.Logger.Error().Msg("nil response in rpc handler")
|
r.client.Logger.Error().Msg("nil response in rpc handler")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
//r.client.Logger.Debug().Any("response", response).Msg("decrypted & decoded response")
|
|
||||||
_, waitingForResponse := r.client.sessionHandler.requests[response.Data.RequestId]
|
_, waitingForResponse := r.client.sessionHandler.requests[response.Data.RequestId]
|
||||||
|
|
||||||
//r.client.Logger.Info().Any("raw", msgArr).Msg("Got msg")
|
|
||||||
//r.client.Logger.Debug().Any("waiting", waitingForResponse).Msg("got request! waiting?")
|
|
||||||
r.client.sessionHandler.addResponseAck(response.ResponseId)
|
r.client.sessionHandler.addResponseAck(response.ResponseId)
|
||||||
if waitingForResponse {
|
if waitingForResponse {
|
||||||
r.client.sessionHandler.respondToRequestChannel(response)
|
r.client.sessionHandler.respondToRequestChannel(response)
|
||||||
|
|
|
@ -49,7 +49,6 @@ func (p *Pairer) RegisterPhoneRelay() (*binary.RegisterPhoneRelayResponse, error
|
||||||
p.client.Logger.Err(err)
|
p.client.Logger.Err(err)
|
||||||
return &binary.RegisterPhoneRelayResponse{}, err
|
return &binary.RegisterPhoneRelayResponse{}, err
|
||||||
}
|
}
|
||||||
//p.client.Logger.Debug().Any("keyByteLength", len(jsonPayload.GetPairDeviceData().EcdsaKeys.EncryptedKeys)).Any("json", jsonPayload).Any("base64", body).Msg("RegisterPhoneRelay Payload")
|
|
||||||
relayResponse, reqErr := p.client.MakeRelayRequest(util.REGISTER_PHONE_RELAY, body)
|
relayResponse, reqErr := p.client.MakeRelayRequest(util.REGISTER_PHONE_RELAY, body)
|
||||||
if reqErr != nil {
|
if reqErr != nil {
|
||||||
p.client.Logger.Err(reqErr)
|
p.client.Logger.Err(reqErr)
|
||||||
|
@ -95,7 +94,6 @@ func (p *Pairer) RefreshPhoneRelay() {
|
||||||
p.client.Logger.Err(err).Msg("refresh phone relay err")
|
p.client.Logger.Err(err).Msg("refresh phone relay err")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
//p.client.Logger.Debug().Any("keyByteLength", len(jsonPayload.PhoneRelay.tachyonAuthToken)).Any("json", jsonPayload).Any("base64", body).Msg("RefreshPhoneRelay Payload")
|
|
||||||
relayResponse, reqErr := p.client.MakeRelayRequest(util.REFRESH_PHONE_RELAY, body)
|
relayResponse, reqErr := p.client.MakeRelayRequest(util.REFRESH_PHONE_RELAY, body)
|
||||||
if reqErr != nil {
|
if reqErr != nil {
|
||||||
p.client.Logger.Err(reqErr).Msg("refresh phone relay err")
|
p.client.Logger.Err(reqErr).Msg("refresh phone relay err")
|
||||||
|
@ -138,7 +136,6 @@ func (c *Client) GetWebEncryptionKey() (*binary.WebEncryptionKeyResponse, error)
|
||||||
c.Logger.Err(err2).Msg("Web encryption key read response err")
|
c.Logger.Err(err2).Msg("Web encryption key read response err")
|
||||||
return nil, err2
|
return nil, err2
|
||||||
}
|
}
|
||||||
//p.client.Logger.Debug().Any("responseLength", len(responseBody)).Any("raw", responseBody).Msg("Response Body Length")
|
|
||||||
parsedResponse := &binary.WebEncryptionKeyResponse{}
|
parsedResponse := &binary.WebEncryptionKeyResponse{}
|
||||||
err2 = proto.Unmarshal(responseBody, parsedResponse)
|
err2 = proto.Unmarshal(responseBody, parsedResponse)
|
||||||
if err2 != nil {
|
if err2 != nil {
|
||||||
|
|
|
@ -16,7 +16,6 @@ func (c *Client) PostRequest(url string, payload []byte, headers interface{}) (*
|
||||||
reqHeaders := &http.Header{}
|
reqHeaders := &http.Header{}
|
||||||
SetHeaders(reqHeaders, headers)
|
SetHeaders(reqHeaders, headers)
|
||||||
req.Header = *reqHeaders
|
req.Header = *reqHeaders
|
||||||
//c.Logger.Info().Any("headers", req.Header).Msg("POST Request Headers")
|
|
||||||
res, reqErr := c.http.Do(req)
|
res, reqErr := c.http.Do(req)
|
||||||
if reqErr != nil {
|
if reqErr != nil {
|
||||||
return res, reqErr
|
return res, reqErr
|
||||||
|
@ -33,7 +32,6 @@ func (c *Client) GetRequest(url string, headers interface{}) (*http.Response, er
|
||||||
reqHeaders := &http.Header{}
|
reqHeaders := &http.Header{}
|
||||||
SetHeaders(reqHeaders, headers)
|
SetHeaders(reqHeaders, headers)
|
||||||
req.Header = *reqHeaders
|
req.Header = *reqHeaders
|
||||||
//c.Logger.Info().Any("headers", req.Header).Msg("GET Request Headers")
|
|
||||||
res, reqErr := c.http.Do(req)
|
res, reqErr := c.http.Do(req)
|
||||||
if reqErr != nil {
|
if reqErr != nil {
|
||||||
return res, reqErr
|
return res, reqErr
|
||||||
|
@ -48,7 +46,6 @@ func (c *Client) MakeRelayRequest(url string, body []byte) (*http.Response, erro
|
||||||
}
|
}
|
||||||
util.BuildRelayHeaders(req, "application/x-protobuf", "*/*")
|
util.BuildRelayHeaders(req, "application/x-protobuf", "*/*")
|
||||||
res, reqErr := c.http.Do(req)
|
res, reqErr := c.http.Do(req)
|
||||||
//c.Logger.Info().Any("bodyLength", len(body)).Any("url", url).Any("headers", res.Request.Header).Msg("Relay Request Headers")
|
|
||||||
if reqErr != nil {
|
if reqErr != nil {
|
||||||
return res, reqErr
|
return res, reqErr
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,6 @@ func (r *RPC) ListenReceiveMessages(payload []byte) {
|
||||||
}
|
}
|
||||||
util.BuildRelayHeaders(req, "application/json+protobuf", "*/*")
|
util.BuildRelayHeaders(req, "application/json+protobuf", "*/*")
|
||||||
resp, reqErr := r.http.Do(req)
|
resp, reqErr := r.http.Do(req)
|
||||||
//r.client.Logger.Info().Any("bodyLength", len(payload)).Any("url", util.RECEIVE_MESSAGES).Any("headers", resp.Request.Header).Msg("RPC Request Headers")
|
|
||||||
if reqErr != nil {
|
if reqErr != nil {
|
||||||
r.client.triggerEvent(&events.ListenTemporaryError{Error: reqErr})
|
r.client.triggerEvent(&events.ListenTemporaryError{Error: reqErr})
|
||||||
errored = true
|
errored = true
|
||||||
|
@ -190,7 +189,6 @@ func (r *RPC) sendMessageRequest(url string, payload []byte) (*http.Response, er
|
||||||
}
|
}
|
||||||
util.BuildRelayHeaders(req, "application/json+protobuf", "*/*")
|
util.BuildRelayHeaders(req, "application/json+protobuf", "*/*")
|
||||||
resp, reqErr := r.client.http.Do(req)
|
resp, reqErr := r.client.http.Do(req)
|
||||||
//r.client.Logger.Info().Any("bodyLength", len(payload)).Any("url", url).Any("headers", resp.Request.Header).Msg("RPC Request Headers")
|
|
||||||
if reqErr != nil {
|
if reqErr != nil {
|
||||||
return nil, fmt.Errorf("error making request: %w", err)
|
return nil, fmt.Errorf("error making request: %w", err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue