Shivaram Lingamneni
101dc6b0d9
increase TLS handshake timeout
4 anos atrás
Shivaram Lingamneni
0af0a0b445
fix a race condition
Setting `closed` on the socket (which can mean either "the socket is broken"
or "we should close the socket at the next opportunity") was racing against
the final write. Even if socket.closed is true, we should attempt to send
buffered message data to the socket, before we send the `finalData` and
actually call `Close`.
5 anos atrás
Shivaram Lingamneni
97e71dfef7
extract Semaphore to utils package
5 anos atrás
Shivaram Lingamneni
85493ef031
upgrade message-tags to non-draft version
5 anos atrás
Shivaram Lingamneni
c8cf0befc6
fixes to irc/socket.go
* fix a race condition: a call to `Write` does not spawn a writer goroutine
if the trylock is held, so `BlockingWrite` must check for fresh data after
releasing the trylock
* streamline some close/finalize logic
5 anos atrás
Shivaram Lingamneni
a0bf548fc5
draft/resume-0.2 implementation, message history support
5 anos atrás
Shivaram Lingamneni
3150f4e23b
reduce copying of output lines
6 anos atrás
Shivaram Lingamneni
ebfef1e848
add Semaphore and ServerSemaphores
6 anos atrás
Shivaram Lingamneni
f54561171e
try to reduce redundant goroutines
6 anos atrás
Shivaram Lingamneni
4778e7bcc7
fixes
* Placate `go vet`
* Reorder the `send` loop, clarify things a little
6 anos atrás
Shivaram Lingamneni
b2f798cf03
eliminate dedicated RunSocketWriter goroutine
6 anos atrás
Shivaram Lingamneni
d1f5c59eef
fix #190
6 anos atrás
Shivaram Lingamneni
8fd1446627
tweak: clean up Socket.Close()
6 anos atrás
Shivaram Lingamneni
0a432c9d99
do an actual nonblocking send instead of the len() trick
6 anos atrás
Shivaram Lingamneni
fa5d4be718
refactor irc.Socket
6 anos atrás
Daniel Oaks
2419f69879
Move all errors into errors.go
6 anos atrás
Euan Kemp
2e8a98a925
irc: fix timer memleak
This is a gotcha called out in the `time.After` docs. `time.After` will
leak the underlying channel if nothing ever receives on it.
7 anos atrás
Daniel Oaks
4254672133
socket: Fix bad mutex unlock
7 anos atrás
Daniel Oaks
c911ff2bcd
Squash a bunch of possible races
7 anos atrás
Daniel Oaks
f7a4f5d956
socket: Move to a timing-out send method that reduces goroutines and ensures QUIT/ERROR are sent
7 anos atrás
Daniel Oaks
067f982da4
socket: Remove old comment
7 anos atrás
Daniel Oaks
4a66771c39
socket: Attempt to close sockets better
7 anos atrás
Daniel Oaks
86957d4392
socket: Fix quitting
7 anos atrás
Daniel Oaks
121269661b
socket: Make closing work a little better
7 anos atrás
Daniel Oaks
317a804644
Fix dates at top of source files
7 anos atrás
Daniel Oaks
91fab3ba55
socket: Better deal with chanfloods
7 anos atrás
Daniel Oaks
f5536d7945
socket: Add a simple println when SendQ exceeded, config comment update
7 anos atrás
Daniel Oaks
c3be2d0d46
socket: Fixup sending code so we can support more connections
7 anos atrás
Daniel Oaks
f29a5f0e70
socket: Very initial SendQ limit
7 anos atrás
Daniel Oaks
de4db1c6ef
socket: Start overhaul of sockets and writing
7 anos atrás
Daniel Oaks
149550b453
socket: Timeout TLS handshakes
7 anos atrás
Daniel Oaks
b5e7d8968f
accounts: Add SASL EXTERNAL handler
8 anos atrás
Daniel Oaks
49034cb20e
certfp: Add certfp retrieval from client
8 anos atrás
Daniel Oaks
2f08401a0f
Attempt to add mostly-correct license info at the top of each file... track this stuff a bit better
8 anos atrás
Daniel Oaks
9860094020
socket: Use updated socket code
8 anos atrás
Jeremy Latt
4ce4ba31c5
keep track of whether sockets are closed
10 anos atrás
Jeremy Latt
6c10add399
improve performance by using less goroutines
- get rid of command channel in Client
- get rid of loginTimer; use other timers instead
- move debugging code to debug.go
10 anos atrás
Jeremy Latt
142bf3d3bb
don't async buffer flushing
10 anos atrás
Jeremy Latt
b0bb0faadc
remove unnecessary String()s; rename parse functions
10 anos atrás
Jeremy Latt
3b12dec207
cleanup
10 anos atrás
Jeremy Latt
2dc69c7e3d
use a Scanner instead of ReadString
10 anos atrás
Jeremy Latt
5f268e4847
async all write buffer flushes
10 anos atrás
Jeremy Latt
d696f2313e
stop leaking client goroutines; closes #34
10 anos atrás
Jeremy Latt
e15f47c766
move to channel-based logging
10 anos atrás
Jeremy Latt
77d053ccac
get rid of editableCommand
10 anos atrás
Jeremy Latt
04f0b2c48d
trim trailing space from commands
10 anos atrás
Jeremy Latt
6f00f89efa
relax unicode parsing rules
NFKC was previously used for all text. Now, we use NFKC for all args but
the last, which may be free text. This arg is normalized with NFC to
allow for formatting characters.
10 anos atrás
Jeremy Latt
45bb0d05e7
normalize all unicode input from the client
10 anos atrás
Jeremy Latt
be089e7f5f
do bcrypt in the client main routine
10 anos atrás
Jeremy Latt
41e6baf9d4
get rid of a race; use pointers where possible
10 anos atrás