@@ -85,7 +85,7 @@ public class Session : ISession
8585 /// <remarks>
8686 /// Some server may restrict number to prevent authentication attacks
8787 /// </remarks>
88- private static readonly SemaphoreLight AuthenticationConnection = new SemaphoreLight ( 3 ) ;
88+ private static SemaphoreLight AuthenticationConnection = new SemaphoreLight ( 3 ) ;
8989
9090 /// <summary>
9191 /// Holds metada about session messages
@@ -948,7 +948,7 @@ internal void SendMessage(Message message)
948948 // increment the packet sequence number only after we're sure the packet has
949949 // been sent; even though it's only used for the MAC, it needs to be incremented
950950 // for each package sent.
951- //
951+ //
952952 // the server will use it to verify the data integrity, and as such the order in
953953 // which messages are sent must follow the outbound packet sequence number
954954 _outboundPacketSequence ++ ;
@@ -1074,12 +1074,12 @@ private Message ReceiveMessage(Socket socket)
10741074
10751075 // Construct buffer for holding the payload and the inbound packet sequence as we need both in order
10761076 // to generate the hash.
1077- //
1077+ //
10781078 // The total length of the "data" buffer is an addition of:
10791079 // - inboundPacketSequenceLength (4 bytes)
10801080 // - packetLength
10811081 // - serverMacLength
1082- //
1082+ //
10831083 // We include the inbound packet sequence to allow us to have the the full SSH packet in a single
10841084 // byte[] for the purpose of calculating the client hash. Room for the server MAC is foreseen
10851085 // to read the packet including server MAC in a single pass (except for the initial block).
@@ -1842,7 +1842,7 @@ private void MessageListener()
18421842 // => the socket will be removed from "readSockets"
18431843 // * the socket is disposed during the Select invocation
18441844 // => the socket will not be removed from "readSocket"
1845- //
1845+ //
18461846 // since we handle the second and third condition the same way and Socket.Connected
18471847 // allows us to check for both conditions, we use that instead of both checking for
18481848 // the removal from "readSockets" and the Connection check
0 commit comments