Commit 8806aa9
committed
[fix] Close the connection cleanly when an error occurs
Instead of destroying the socket, try to close the connection cleanly
if an error (such as a data framing error) occurs after the opening
handshake has completed.
Also, to comply with the specification, use the 1006 status code if no
close frame is received, even if the connection is closed due to an
error.
Fixes #18981 parent 05b8ccd commit 8806aa9
2 files changed
+21
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
808 | 808 | | |
809 | 809 | | |
810 | 810 | | |
| 811 | + | |
811 | 812 | | |
812 | | - | |
813 | | - | |
| 813 | + | |
814 | 814 | | |
815 | | - | |
816 | 815 | | |
817 | 816 | | |
818 | 817 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
429 | 429 | | |
430 | 430 | | |
431 | 431 | | |
| 432 | + | |
432 | 433 | | |
433 | 434 | | |
434 | 435 | | |
| |||
440 | 441 | | |
441 | 442 | | |
442 | 443 | | |
443 | | - | |
| 444 | + | |
| 445 | + | |
444 | 446 | | |
445 | | - | |
446 | 447 | | |
447 | 448 | | |
448 | 449 | | |
449 | 450 | | |
450 | 451 | | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
451 | 459 | | |
452 | 460 | | |
453 | 461 | | |
| |||
1410 | 1418 | | |
1411 | 1419 | | |
1412 | 1420 | | |
| 1421 | + | |
1413 | 1422 | | |
1414 | 1423 | | |
1415 | 1424 | | |
1416 | 1425 | | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
1417 | 1432 | | |
1418 | 1433 | | |
1419 | 1434 | | |
| |||
1434 | 1449 | | |
1435 | 1450 | | |
1436 | 1451 | | |
1437 | | - | |
| 1452 | + | |
| 1453 | + | |
1438 | 1454 | | |
1439 | | - | |
1440 | 1455 | | |
1441 | 1456 | | |
1442 | 1457 | | |
| |||
0 commit comments