zhangshenghang opened a new pull request, #11134:
URL: https://github.com/apache/seatunnel/pull/11134

   ### Purpose
   
   Fixes #10528.
   
   `SocketSourceReader.pollNext()` created a new `BufferedReader` with 
try-with-resources on every poll. Closing that reader also closed the socket 
input stream, so the next `pollNext()` call could fail with `Socket is closed` 
even though the source reader itself had not been closed.
   
   ### Changes
   
   - Create the socket `BufferedReader` once when the source reader opens.
   - Keep the socket input stream alive across multiple `pollNext()` calls.
   - Close the reader during the source reader lifecycle close step.
   - Add a unit test that verifies two consecutive polls can read from the same 
socket connection.
   
   ### Tests
   
   - `./mvnw -pl seatunnel-connectors-v2/connector-socket -am -DskipIT 
-Dtest=SocketSourceReaderTest -DfailIfNoTests=false verify`
   - `./mvnw spotless:apply`
   - `./mvnw -q -DskipTests verify`
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to