Skip to content
This repository has been archived by the owner on Dec 5, 2021. It is now read-only.

Pr/697 review updates #940

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

markwest51
Copy link

updated changes aside from nLog from pr/697

@knocte
Copy link
Collaborator

knocte commented Apr 13, 2020

@markwest51 thanks! can you rebase it?

@markwest51
Copy link
Author

@knocte - resolved conflicts that appeared, not sure about removing _ from private vars though and also whether to call async methods prefix, we normally remove that as you can tell whether method is async by await call in preview but up to you

@knocte
Copy link
Collaborator

knocte commented Apr 14, 2020

There are still conflicts, did you really rebase? rebasing shouldn't imply new commits.

@knocte
Copy link
Collaborator

knocte commented Apr 14, 2020

Nevermind, I had the wrong merge option chosen. There are still things to fix in this PR but before I point them out, I gotta ask: did you test it? does it work well for you?

@markwest51
Copy link
Author

@knocte not tested anything yet, was gonna wait till codebase is ready before doing that

@knocte
Copy link
Collaborator

knocte commented Apr 14, 2020

not tested anything yet, was gonna wait till codebase is ready before doing that

but the problem about doing that is that we may break it in the next review iteration hehe

@markwest51
Copy link
Author

@knocte that's fine :-), feel free to point out the stuff you see, will amend later after work

@knocte
Copy link
Collaborator

knocte commented Apr 14, 2020

that's fine :-)

it's not fine, believe me, finding regressions in code that was working before, is tricky :P

Please test it first, and I will continue with the review once we know this in fact brings value.

@markwest51
Copy link
Author

update event now gets triggered on each update, for test need to figure out how to read saved messages.

Tasks.

  1. Possibly add cancellation token to MainLoopAsync
  2. Figure out how to trigger scheduled tasks/idle tasks from a client - make sure main thread is not blocked
  3. Remove NLog

Is @merqlove able to provide input as it is their original working code.

@markwest51 markwest51 force-pushed the pr/697-review-updates branch 2 times, most recently from acd9f32 to c064dcb Compare April 19, 2020 01:26
@knocte
Copy link
Collaborator

knocte commented Apr 19, 2020

Apparently there still are conflicts.

@markwest51
Copy link
Author

@knocte where are these conflicts ?, updates work fine from what i can see when running for the last hr, have added cancellation token to methods, inside the main one there are subscribed tasks and idle tasks not sure what the intention of this was.

@knocte
Copy link
Collaborator

knocte commented Apr 20, 2020

Github says "This branch cannot be rebased due to conflicts
Rebasing the commits of this branch on top of the base branch cannot be performed automatically due to conflicts encountered while reapplying the individual commits from the head branch."

@knocte
Copy link
Collaborator

knocte commented Apr 20, 2020

@markwest51 how have you rebased?

@markwest51
Copy link
Author

@knocte i rebased to a previous commit on my branch to remove some information, did i need to rebase to master or something

@knocte
Copy link
Collaborator

knocte commented Apr 21, 2020

I guess so, otherwise Github would not let me merge.

@markwest51
Copy link
Author

think i resolved conflicts by rebasing thru GitBash to master, looks like VS2017 is not that good with GitHub, do not merge yet though until tested again

@markwest51
Copy link
Author

@knocte it is back working ok now - getting all updates coming through, was having problems earlier but run a send message test which gave me a socket error about previous connection being closed and then it is back working fine, not sure what that would be but it looked like socket connection was not working, was fine before all the rebasing so could be that.

@knocte
Copy link
Collaborator

knocte commented Apr 22, 2020

was having problems earlier but run a send message test which gave me a socket error about previous connection being closed and then it is back working fine, not sure what that would be but it looked like socket connection was not working, was fine before all the rebasing so could be that.

Man, everytime you face a problem like this, please, paste the ex.ToString() here. I cannot comment on such a small level of detail.

@knocte
Copy link
Collaborator

knocte commented Apr 22, 2020

Github is still telling me This branch cannot be rebased due to conflicts Rebasing the commits of this branch on top of the base branch cannot be performed automatically due to conflicts encountered while reapplying the individual commits from the head branch. I would recommend to rebase going back to basics: with git commands. Just do git fetch --all and git rebase origin/master (provided origin points to TLSharp, not to your fork of TLSharp)

@knocte
Copy link
Collaborator

knocte commented Apr 22, 2020

BTW if it's easier for you, before rebasing you could squash your commits into 1, first. That would make rebasing easier I guess

pr updates

amended pr review changes

resolved merge conflicts

updates from last night before rebase

update on message test now passing

removed nlog references and usage

resolve conflicts from HEAD

Reapply Events PR sochix#679

update on message test now passing

removed nlog references and usage
@markwest51
Copy link
Author

@knocte are you able to check conflicts now, squashed commits using gitbash in the end rather than VS

@markwest51
Copy link
Author

@knocte have done the git commands specified, says branch is up to date and rebased to your master as asked.

@knocte
Copy link
Collaborator

knocte commented Apr 26, 2020

ok seems no conflicts now! will do the last review today

README.md Outdated
{
var peer = new TLInputPeerUser() { UserId = status.UserId };
client.SendMessageAsync(peer, "Você está online.").Wait();
} catch {}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove this empty catch

Comment on lines 139 to 165
while (!request.ConfirmReceived)
while (!request.ConfirmReceived)
{
var result = DecodeMessage((await transport.Receive(token).ConfigureAwait(false)).Body);

using (var messageStream = new MemoryStream(result.Item1, false))
using (var messageReader = new BinaryReader(messageStream))
using (var messageStream = new MemoryStream (result.Item1, false))
using (var messageReader = new BinaryReader (messageStream))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please revert unneeded whitespace changes like the above

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@markwest51
Copy link
Author

@knocte all comments done and reviewed. Have added a comment on the test as have worked out why the updates were not being triggered, it was because the user needed re-authenticating, i was using the session user so there must be a expiration time. Soon as i done that all was working fine

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@markwest51
Copy link
Author

@knocte we all good ?

@knocte
Copy link
Collaborator

knocte commented Sep 11, 2020

@markwest51 hey Mark, sorry to drop the ball on this. Reason is I wanted to push the Layer Update (to 108) first, and later merge this PR, but I lacked the motivation for very long to finish the Layer update first. Today I've finished that and I pushed it here: https://github.com/nblockchain/TgSharp . In the following days I plan to port this PR to that repo, if you don't beat me to it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants