Commit graph

20 commits

Author SHA1 Message Date
Joachim Bauch f8899ef189
Add mutex for "handler" in client.
Fix flaky race as follow-up to #715
2024-04-23 12:42:31 +02:00
Joachim Bauch 0c2cefa63a
Don't return "false" if message sending closed the connection. 2024-04-23 11:09:04 +02:00
Joachim Bauch 2468443572
Add "HandlerClient" interface to support custom implementations. 2024-04-23 11:03:30 +02:00
Joachim Bauch c134883138
Switch to atomic types from Go 1.19 2023-10-30 09:32:46 +01:00
Joachim Bauch d49d3704fa
Use interface for client callbacks. 2023-02-22 08:34:17 +01:00
Joachim Bauch e9f80c6b4d
Start message processing earlier. 2023-02-22 08:34:17 +01:00
Joachim Bauch 8353cbbb0f
Migrate to closer helper class. 2023-02-22 08:34:15 +01:00
Joachim Bauch 758899b745
Simplify close code of client to make clear when it gets closed internally. 2023-02-22 08:34:14 +01:00
Joachim Bauch b7f221705a
Close message channel before closing client.
Otherwise the call to "Close" might wait forever for the message processing
goroutine to finish.
2023-01-18 14:26:40 +01:00
Joachim Bauch 8de8b39a5c
Stop using WaitGroup to detect finished message processing.
This causes flaky races if "Wait" and "Add" are being used from different
goroutines.
2023-01-17 12:09:06 +01:00
Joachim Bauch 614c5f6e21
Fix issues reported by revive. 2022-02-11 12:09:42 +01:00
Joachim Bauch 782503a141
Don't log RTT of proxy clients. 2021-11-03 14:56:51 +01:00
Joachim Bauch ce1b3fc6e2
Add more metrics on rooms / sessions / backends. 2021-08-10 08:50:41 +02:00
Joachim Bauch 2628735431
Send close message when explicitly closing client. 2021-06-07 17:14:31 +02:00
Joachim Bauch fe95626f3b
Support closing clients from message processor. 2021-06-07 15:15:50 +02:00
Joachim Bauch 618e7b085e
Fix potential race condition when closing message channel. 2021-06-07 15:14:51 +02:00
Joachim Bauch b8b46264c1
Create messagechan for proxy clients. 2021-06-04 15:40:42 +02:00
Joachim Bauch 2b02a2f929
Make client message processing asynchronous.
This helps in detecting clients that disconnect while a backend request for
them is still active (e.g. joining a room).
2021-06-04 15:40:39 +02:00
Joachim Bauch c8e4bfe007
Fix various issues found by golangci-lint. 2021-04-26 17:25:52 +02:00
Joachim Bauch 8ba2e0ad64
Switch dependency tracking to Go modules.
With that bump minimum required version to Go 1.13.
2021-04-09 16:15:00 +02:00
Renamed from src/signaling/client.go (Browse further)