Commit 0faf4b5
fix crash on sendKeepalive fail
Summary:
if the socket connection is closed (or a close is detected) remotely during sendKeepalive then
* stop() gets invoked and
* the connection_ pointer is cleared and
* pending_ is set to false
* but pending_ will still be set to true after this returns, and you'll get a crash as the connection_ shared_ptr is now null.
swapping the order allows stop() to clear the pending_ flag properly if send fails.
Reviewed By: phoad
Differential Revision: D8926438
fbshipit-source-id: 897a46abc70a50d1e6cce50c0502a4cd86d6d4ae1 parent 0470932 commit 0faf4b5
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
| 57 | + | |
57 | 58 | | |
| 59 | + | |
58 | 60 | | |
59 | 61 | | |
60 | 62 | | |
| |||
0 commit comments