vechain / thor

A general purpose blockchain highly compatible with Ethereum's ecosystem
GNU Lesser General Public License v3.0
791 stars 247 forks source link

Fix WS connection hijack #766

Closed otherview closed 1 month ago

otherview commented 1 month ago

Description

Hijack lets the caller take over the connection. This is needed in WS connections and was not implemented in the metrics new response writer.

This PR adds the Hijack method.

Type of change

Checklist:

codecov-commenter commented 1 month ago

Codecov Report

Attention: Patch coverage is 0% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 62.58%. Comparing base (27e60e6) to head (5779eba).

Files Patch % Lines
api/metrics.go 0.00% 5 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #766 +/- ## ========================================== - Coverage 62.59% 62.58% -0.02% ========================================== Files 199 199 Lines 18093 18098 +5 ========================================== Hits 11326 11326 - Misses 5685 5690 +5 Partials 1082 1082 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.