hey guys, I'm currently playing with twisted and I have the following code: https://gist.github.com/devos50/2d186458c29feb9.... It contains a Instance2InstanceClient, Instance2InstanceServer, I2IFactory, I2I and a TestServer object. When I run the test on Debian, the test passes but on OS X, it doesn't. Does anyone have an idea why this could be?
g_barker has quit
warner
devos50: hm, your Instance2InstanceClient is going to block (in s.connect) until the server responds, and (since this is all in one thread) that means your server won't get any runtime
which I think makes it a race between which one is ready first, which might be random, or might tend to land one way on OS-X more often than some other platform
licensed has quit
I'm not sure what your AbstractServer or Event is doing, but you may either need to construct your i2i_client in a thread (it's your constructor that will block), or use an async twisted-native TCP4ClientEndpoint (and a new factory+protocol), rather than raw socket calls
licensed joined the channel
devos50
warner: thanks for the suggestion! Will try that
warner
not sure why it should *consistently* fail on one OS vs another, but races are funny things :)
devos50
warner: yeah it's interesting to see the differences between various platforms
Currently working on a rather big Python project and I'm trying to get it working cross-platform
encountered many different issues already
warner
might have to do with select() or kqueue or whatever returning events in a different order
devos50 has quit
kenaan
warner re-opened <https://tm.tl/#8014> - HostnameEndpoint: AlreadyCalledError when cancelling connection
cwolfe joined the channel
warner
argh, trac spamfiltered me again
on ticket #4735, but not on #8014
mat^2 joined the channel
thanks idnar for retraining the spamfilter, #4735 comments posted successfully