mirror of
https://github.com/jeremyd/ergo.git
synced 2026-05-17 13:24:48 -07:00
add panic handler to async client/channel writes
See #2113 for motivation
This commit is contained in:
@@ -222,6 +222,8 @@ func (channel *Channel) wakeWriter() {
|
|||||||
|
|
||||||
// equivalent of Socket.send()
|
// equivalent of Socket.send()
|
||||||
func (channel *Channel) writeLoop() {
|
func (channel *Channel) writeLoop() {
|
||||||
|
defer channel.server.HandlePanic()
|
||||||
|
|
||||||
for {
|
for {
|
||||||
// TODO(#357) check the error value of this and implement timed backoff
|
// TODO(#357) check the error value of this and implement timed backoff
|
||||||
channel.performWrite(0)
|
channel.performWrite(0)
|
||||||
|
|||||||
@@ -1773,6 +1773,8 @@ func (client *Client) wakeWriter() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (client *Client) writeLoop() {
|
func (client *Client) writeLoop() {
|
||||||
|
defer client.server.HandlePanic()
|
||||||
|
|
||||||
for {
|
for {
|
||||||
client.performWrite(0)
|
client.performWrite(0)
|
||||||
client.writebackLock.Unlock()
|
client.writebackLock.Unlock()
|
||||||
|
|||||||
Reference in New Issue
Block a user