File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -207,6 +207,7 @@ private boolean decodeHandshake( ByteBuffer socketBufferNew ) throws IOException
207207 tmpHandshakeBytes .flip ();
208208 socketBuffer = tmpHandshakeBytes ;
209209 }
210+ socketBuffer .mark ();
210211 try {
211212 if ( draft == null ) {
212213 HandshakeState isflashedgecase = isFlashEdgeCase ( socketBuffer );
@@ -217,7 +218,7 @@ private boolean decodeHandshake( ByteBuffer socketBufferNew ) throws IOException
217218 }
218219 }
219220 HandshakeState handshakestate = null ;
220- socketBuffer . mark ();
221+
221222 try {
222223 if ( role == Role .SERVER ) {
223224 if ( draft == null ) {
@@ -298,6 +299,7 @@ private boolean decodeHandshake( ByteBuffer socketBufferNew ) throws IOException
298299 }
299300 } catch ( IncompleteHandshakeException e ) {
300301 if ( tmpHandshakeBytes == null ) {
302+ socketBuffer .reset ();
301303 int newsize = e .getPreferedSize ();
302304 if ( newsize == 0 ) {
303305 newsize = socketBuffer .capacity () + 16 ;
You can’t perform that action at this time.
0 commit comments