forked from External/ergo
Merge pull request #2117 from slingamn/handlepanic
add panic handler to async client/channel writes
This commit is contained in:
commit
0f059ea2cc
2 changed files with 4 additions and 0 deletions
|
|
@ -222,6 +222,8 @@ func (channel *Channel) wakeWriter() {
|
|||
|
||||
// equivalent of Socket.send()
|
||||
func (channel *Channel) writeLoop() {
|
||||
defer channel.server.HandlePanic()
|
||||
|
||||
for {
|
||||
// TODO(#357) check the error value of this and implement timed backoff
|
||||
channel.performWrite(0)
|
||||
|
|
|
|||
|
|
@ -1773,6 +1773,8 @@ func (client *Client) wakeWriter() {
|
|||
}
|
||||
|
||||
func (client *Client) writeLoop() {
|
||||
defer client.server.HandlePanic()
|
||||
|
||||
for {
|
||||
client.performWrite(0)
|
||||
client.writebackLock.Unlock()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue