Kitura / Kitura-redis

Swift Redis library
Apache License 2.0
94 stars 25 forks source link

Make connected computed property #57

Closed quanvo87 closed 7 years ago

quanvo87 commented 7 years ago

connected currently only reflects the result of initially trying to connect to the database.

I've made it a computed property that returns whether the underlying socket isConnected.

However, this socket property does not get updated in the event of a disconnect (only on socket.close()). I've noted this in the documentation.

Also various small code improvements.

Description

Motivation and Context

56

How Has This Been Tested?

All tests still pass on macOS.

Checklist:

codecov-io commented 7 years ago

Codecov Report

Merging #57 into master will decrease coverage by 0.04%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #57      +/-   ##
==========================================
- Coverage   92.36%   92.32%   -0.05%     
==========================================
  Files          45       45              
  Lines        7913     7910       -3     
==========================================
- Hits         7309     7303       -6     
- Misses        604      607       +3
Impacted Files Coverage Δ
Sources/Redis.swift 70.26% <100%> (-0.12%) :arrow_down:
Sources/RedisResp.swift 78.45% <100%> (-0.24%) :arrow_down:
Sources/RedisInfo.swift 91.42% <0%> (-8.58%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update cde7e07...2d5f1eb. Read the comment docs.