Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sfu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alain Takoudjou
sfu
Commits
32e8f08b
Commit
32e8f08b
authored
May 30, 2020
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move dead errors into webclient.
parent
2dd230ca
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
14 deletions
+5
-14
group.go
group.go
+0
-12
webclient.go
webclient.go
+5
-2
No files found.
group.go
View file @
32e8f08b
...
...
@@ -315,18 +315,6 @@ func (g *group) getChatHistory() []chatHistoryEntry {
return
h
}
type
writerDeadError
int
func
(
err
writerDeadError
)
Error
()
string
{
return
"client writer died"
}
type
clientDeadError
int
func
(
err
clientDeadError
)
Error
()
string
{
return
"client dead"
}
type
groupUser
struct
{
Username
string
`json:"username,omitempty"`
Password
string
`json:"password,omitempty"`
...
...
webclient.go
View file @
32e8f08b
...
...
@@ -1732,12 +1732,15 @@ func clientWriter(conn *websocket.Conn, ch <-chan interface{}, done chan<- struc
}
}
var
ErrWriterDead
=
errors
.
New
(
"client writer died"
)
var
ErrClientDead
=
errors
.
New
(
"client dead"
)
func
(
c
*
webClient
)
action
(
m
interface
{})
error
{
select
{
case
c
.
actionCh
<-
m
:
return
nil
case
<-
c
.
done
:
return
clientDeadError
(
0
)
return
ErrClientDead
}
}
...
...
@@ -1746,7 +1749,7 @@ func (c *webClient) write(m clientMessage) error {
case
c
.
writeCh
<-
m
:
return
nil
case
<-
c
.
writerDone
:
return
writerDeadError
(
0
)
return
ErrWriterDead
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment