Browse Source
Merge pull request #2117 from slingamn/handlepanic
add panic handler to async client/channel writes
tags/v2.13.0-rc1
Shivaram Lingamneni
3 months ago
No account linked to committer's email address
|
@@ -222,6 +222,8 @@ func (channel *Channel) wakeWriter() {
|
222
|
222
|
|
223
|
223
|
// equivalent of Socket.send()
|
224
|
224
|
func (channel *Channel) writeLoop() {
|
|
225
|
+ defer channel.server.HandlePanic()
|
|
226
|
+
|
225
|
227
|
for {
|
226
|
228
|
// TODO(#357) check the error value of this and implement timed backoff
|
227
|
229
|
channel.performWrite(0)
|
|
@@ -1773,6 +1773,8 @@ func (client *Client) wakeWriter() {
|
1773
|
1773
|
}
|
1774
|
1774
|
|
1775
|
1775
|
func (client *Client) writeLoop() {
|
|
1776
|
+ defer client.server.HandlePanic()
|
|
1777
|
+
|
1776
|
1778
|
for {
|
1777
|
1779
|
client.performWrite(0)
|
1778
|
1780
|
client.writebackLock.Unlock()
|