Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Close connection when invalid framing is detected
- Loading branch information
1 parent
81333e7
commit 0289290
Showing
3 changed files
with
63 additions
and
13 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
src/Orleans.Core/Messaging/InvalidMessageFrameException.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#nullable enable | ||
|
||
using System; | ||
using System.Runtime.Serialization; | ||
|
||
namespace Orleans.Runtime.Messaging; | ||
|
||
/// <summary> | ||
/// Indicates that a message frame is invalid, either when sending a messare or receiving a message. | ||
/// </summary> | ||
[GenerateSerializer] | ||
public sealed class InvalidMessageFrameException : OrleansException | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="InvalidMessageFrameException"/> class. | ||
/// </summary> | ||
public InvalidMessageFrameException() | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="InvalidMessageFrameException"/> class. | ||
/// </summary> | ||
/// <param name="message">The message that describes the error.</param> | ||
public InvalidMessageFrameException(string message) : base(message) | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="InvalidMessageFrameException"/> class. | ||
/// </summary> | ||
/// <param name="message">The message that describes the error.</param> | ||
/// <param name="innerException">The exception that is the cause of the current exception.</param> | ||
public InvalidMessageFrameException(string message, Exception innerException) : base(message, innerException) | ||
{ | ||
} | ||
|
||
protected InvalidMessageFrameException(SerializationInfo info, StreamingContext context) : base(info, context) | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters