ChanServ changed the topic of #crystal-lang to: The Crystal programming language | https://crystal-lang.org | Fund Crystal's development: https://crystal-lang.org/sponsors | GH: https://github.com/crystal-lang/crystal | Docs: https://crystal-lang.org/docs | Gitter: https://gitter.im/crystal-lang/crystal
<FromGitter> <mixflame> alright, i got it to connect, now im just back to the refusal to send bug
<FromGitter> <mixflame> ERROR :Closing link: (97KAAAAEC@c-107-2-145-228.hsd1.co.comcast.net) [Registration timeout]
<FromGitter> <mixflame> something to do with flush()?
notzmv has joined #crystal-lang
<FromGitter> <Blacksmoke16> https://gist.github.com/mixflame/4e81d9083a02c9859ccc59c623b4d3c9#file-irc-cr-L79 is prob closing the socket so that when the other fibers execute it's closed
<FromGitter> <Blacksmoke16> would be my guess without actually trying it
<FromGitter> <watzon> Seems likely. The code inside of the spawn is going to run asynchronously, so the `.close` is going to happen while the socket is still being accessed.
<FromGitter> <mixflame> whoa thx
<FromGitter> <Blacksmoke16> looks like you got some non-ideal concurrency code going on
<FromGitter> <mixflame> sorry guys even with that close disable the server still closes the link, there's a fail to write... i'll show the current code
<FromGitter> <mixflame> the code has worked fine before without the SSL stuff bolted on...
<FromGitter> <mixflame> trying to get it onto my irc network
<FromGitter> <Blacksmoke16> whats the error exactly again?
<FromGitter> <mixflame> i'm back to this IRC based error, "ERROR :Closing link: (97KAAAAEC@c-107-2-145-228.hsd1.co.comcast.net) [Registration timeout]"
<FromGitter> <mixflame> it happens when you don't do this fast enough:
<FromGitter> <mixflame> ``````
<FromGitter> <mixflame> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=60d915a6457e19611a216299]
<FromGitter> <Blacksmoke16> so at this point it sounds like it's a logic problem
<FromGitter> <mixflame> surely
<FromGitter> <mixflame> but the SSL socket simply isn't sending, i ran into this before
<FromGitter> <Blacksmoke16> do you need to use that socket directly versus just like `HTTP::Client` with tls enabled?
<FromGitter> <mixflame> there's no TLS enable IRC socket in the crystal lang lib
<FromGitter> <mixflame> it's speaking the Internet Relay Chat protocol
<FromGitter> <Blacksmoke16> ah right, and it's not HTTP based i take it?
<FromGitter> <mixflame> nope, non http
<FromGitter> <Blacksmoke16> gotcha
<FromGitter> <mixflame> this part is usually simple
<FromGitter> <mixflame> and not hard
<FromGitter> <mixflame> and i had it working before
<FromGitter> <mixflame> there seems to be a bug in the ssl socket, not sure if this is related but i can't decode it: https://github.com/crystal-lang/crystal/issues/5375
<FromGitter> <mixflame> he (RX14) says call #flush... but the doc's don't say this...
<FromGitter> <mixflame> i tried calling flush tho.. didn't write
<FromGitter> <Blacksmoke16> did you try using `<< "some str"` then `.flush`
<FromGitter> <mixflame> i did try, that...
<FromGitter> <mixflame> just changed it to this...
<FromGitter> <mixflame> ``````
<FromGitter> <mixflame> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=60d917478a40b117283098e5]
<FromGitter> <mixflame> no send
<FromGitter> <mixflame> whoa! ⏎ i got it to login
<FromGitter> <mixflame> see the response count think
<FromGitter> <mixflame> turns out my server only sends 2
<FromGitter> <mixflame> yeah protocol code lol :D
<FromGitter> <Blacksmoke16> mmk
ur5us has quit [Ping timeout: 272 seconds]
ur5us has joined #crystal-lang
<FromGitter> <mixflame> if you were wondering here is the full code that works https://gist.github.com/mixflame/057abeff96311c91f0d2e81fbd0edb26
<FromGitter> <mixflame> IRC SSL in Crystal ^
aquijoule_ has joined #crystal-lang
richbridger has quit [Ping timeout: 268 seconds]
deavmi has quit [Quit: No Ping reply in 180 seconds.]
deavmi has joined #crystal-lang
Nik- has joined #crystal-lang
Nik- has quit [Read error: Connection reset by peer]
Nik- has joined #crystal-lang
deavmi has quit [Ping timeout: 268 seconds]
elf_fortrez has joined #crystal-lang
elf_fortrez has quit [Write error: Broken pipe]
ur5us has quit [Ping timeout: 272 seconds]
deavmi has joined #crystal-lang
ur5us has joined #crystal-lang
fifr has joined #crystal-lang
ur5us has quit [Ping timeout: 250 seconds]
notzmv has quit [Read error: Connection reset by peer]
hightower4 has quit [Read error: Connection reset by peer]
hightower2 has joined #crystal-lang
ur5us has joined #crystal-lang
mps has joined #crystal-lang
notzmv has joined #crystal-lang
ur5us has quit [Ping timeout: 250 seconds]
fifr has quit [Read error: Connection reset by peer]
fifr has joined #crystal-lang
HumanG33k has joined #crystal-lang
m4xm4n has quit [Quit: Connection closed for inactivity]
Nik- has quit [Ping timeout: 272 seconds]
dostoyevsky2 has quit [Ping timeout: 256 seconds]
hightower2 has quit [Ping timeout: 252 seconds]
dostoyevsky2 has joined #crystal-lang
ur5us has joined #crystal-lang
ur5us has quit [Ping timeout: 250 seconds]
ur5us has joined #crystal-lang