hazelcast / hazelcast-nodejs-client

Hazelcast Node.js Client
https://hazelcast.com/clients/node-js/
Apache License 2.0
150 stars 58 forks source link

Change logic around closing connections and writers API-1283 (redux) #1442

Closed srknzl closed 1 year ago

srknzl commented 1 year ago

Clean port of #1417

Already approved in https://github.com/hazelcast/hazelcast-nodejs-client/pull/1417

Will merge with one approval because it is already approved.


fixes #1256

The issue was writing some data to the connection after it being closed. I changed and refactored some logic around PipelinedWriter and Connection to avoid that.

codecov[bot] commented 1 year ago

Codecov Report

Merging #1442 (dccd658) into master (815b3af) will decrease coverage by 0.02%. The diff coverage is 84.61%.

@@            Coverage Diff             @@
##           master    #1442      +/-   ##
==========================================
- Coverage   93.34%   93.32%   -0.03%     
==========================================
  Files         466      466              
  Lines       16616    16623       +7     
  Branches     1348     1351       +3     
==========================================
+ Hits        15511    15514       +3     
- Misses        803      807       +4     
  Partials      302      302              
Impacted Files Coverage Δ
src/network/Connection.ts 94.82% <84.61%> (+0.60%) :arrow_up:
src/network/ConnectionManager.ts 83.99% <0.00%> (-1.17%) :arrow_down:
src/protocol/ErrorFactory.ts 64.66% <0.00%> (-0.76%) :arrow_down:
src/core/HazelcastError.ts 77.61% <0.00%> (-0.75%) :arrow_down:
src/invocation/InvocationService.ts 94.87% <0.00%> (+0.36%) :arrow_up:
src/util/Util.ts 87.67% <0.00%> (+0.68%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more