alpha
Login
or
Join now
willdot.net
/
distributed-pds
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
A fork of the Cocoon PDS but being made more distributed.
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
fix websocket disconnect
author
Hailey
date
6 months ago
(Jan 4, 2026, 2:11 PM -0800)
commit
15f39b76
15f39b7620817292cfca39c71455ce3f01f3261b
parent
a279b3fa
a279b3fae4d7782e6dce5da868357eb020becbcc
+9
-3
1 changed file
Expand all
Collapse all
Unified
Split
server
handle_sync_subscribe_repos.go
+9
-3
server/handle_sync_subscribe_repos.go
View file
Reviewed
···
43
43
// drop the connection whenever a subscriber disconnects from the socket, we should get errors
44
44
go func() {
45
45
for {
46
46
-
if _, _, err := conn.ReadMessage(); err != nil {
47
47
-
logger.Warn("websocket error", "err", err)
48
48
-
cancel()
46
46
+
select {
47
47
+
case <-ctx.Done():
48
48
+
return
49
49
+
default:
50
50
+
if _, _, err := conn.ReadMessage(); err != nil {
51
51
+
logger.Warn("websocket error", "err", err)
52
52
+
cancel()
53
53
+
return
54
54
+
}
49
55
}
50
56
}
51
57
}()