Skip to content
This repository was archived by the owner on May 25, 2020. It is now read-only.

App state resseting error fix #43

Merged
merged 15 commits into from
May 13, 2020
Merged

App state resseting error fix #43

merged 15 commits into from
May 13, 2020

Conversation

tarampampam
Copy link
Contributor

@tarampampam tarampampam commented May 12, 2020

Q A
Bug fix? Yes
New feature? No

Description

Added

  • Event LoopErrorOccurredEvent (triggered on request processing exception)
  • Listener SendExceptionToStderrListener for direct exception sending (as a string) into stderr
  • Listener StopWorkerListener for worker stopping

Changed

  • Default package configuration includes LoopErrorOccurredEvent event listeners: SendExceptionToStderrListener and StopWorkerListener
  • When "debug mode" (app.debug) is not enabled - client will get only Internal server error string instead exception with stacktrace

Fixed

  • Double response sending on request processing error (calling $psr7_client->respond and $psr7_client->getWorker()->error after that)

Fixes #42

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I wrote unit tests for my code (if tests is required for my changes)
  • I have made changes in CHANGELOG.md file

@tarampampam tarampampam self-assigned this May 12, 2020
@codecov-io
Copy link

codecov-io commented May 12, 2020

Codecov Report

Merging #43 into master will decrease coverage by 0.81%.
The diff coverage is 90.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #43      +/-   ##
============================================
- Coverage     97.70%   96.89%   -0.82%     
- Complexity      105      117      +12     
============================================
  Files            23       26       +3     
  Lines           262      290      +28     
============================================
+ Hits            256      281      +25     
- Misses            6        9       +3     
Impacted Files Coverage Δ Complexity Δ
src/Listeners/SendExceptionToStderrListener.php 0.00% <0.00%> (ø) 2.00 <2.00> (?)
src/Events/LoopErrorOccurredEvent.php 100.00% <100.00%> (ø) 4.00 <4.00> (?)
src/Listeners/StopWorkerListener.php 100.00% <100.00%> (ø) 2.00 <2.00> (?)
src/Worker.php 95.45% <100.00%> (+0.64%) 26.00 <3.00> (+4.00)

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 0b8c3f5...2f72161. Read the comment docs.

@jetexe jetexe force-pushed the fix/app-state-resetting branch from c15b505 to f6492de Compare May 13, 2020 06:41
@tarampampam tarampampam force-pushed the fix/app-state-resetting branch from f6492de to d845569 Compare May 13, 2020 07:35
@tarampampam tarampampam merged commit 2f7cac7 into master May 13, 2020
@tarampampam tarampampam deleted the fix/app-state-resetting branch May 13, 2020 07:49
@tarampampam
Copy link
Contributor Author

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

Error with application state resetting (when http kernel generates an exception)
3 participants