Repository navigation
Conversation
Doh, the obvious mistake here was that the data was not read from the correct index.
No real reason, just feels like this is more tolerant of coding errors (and thus harder to debug ;-)
Otherwise, a double-free error can occur.
Also, do not print anything if mutex is already locke when using `trylock`
Timer engine now spawns worker threads to run the actual tasks. Sockets are now strictly locked with sock->lock, since this simplifies the interplay between timers, input handler and the user socket handler.
Oops, this caused doublelocking (timer_free) and timers were never released.
Not sure if this helps that much, but if clearly a thread only needs to read data from the socket, it can use `rdlock` then.
Lvl-ip spends its most time here, and felt like the 1ms resolution is a bit too fine for the purposes.
We really want to lock it and not bail out. Also, added error printing if the lock can't be acquired.
This still isn't how I'd like it to be, but the twist is that we need to lock the timer, remove it from the list, and only then can we unlock it. Which begs the question, if refcnt is 0, nobody should be able to acquire the timer reference anymore!
I know, sleeping like this is not that maintainable. Proper solution would be to poll the HTTP server for when it's up.
…imer-dispatch Refactor/use worker threads in timer dispatch
Not sure why it takes so long, but the difference is noticeable now.
For some reason, TravisCI fails sporadically a lot on this. Increasing the sleep time seems to help, or then I'm just chasing a red herring!
This is a hack to tolerate lower ranges in the network better. Parsing the sender MSS from the synack is on the TODO list.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stability improvements with improved (simplified) locking scheme. See #10
Artificially lowered and hardcoded sender MSS, in order to accommodate lower ranges. Correctly determining the MSS is in TODO.
End-to-end test suites have their hackish sleeps increased, since TravisCI VM sporadically fails. A proper test framework is in TODO.