Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Improve and Optimize ShutdownWithContext Func #3162

Open
wants to merge 26 commits into
base: main
Choose a base branch
from

Commits on Oct 10, 2024

  1. feat: Optimize ShutdownWithContext method in app.go

    - Reorder mutex lock acquisition to the start of the function
    - Early return if server is not running
    - Use defer for executing shutdown hooks
    - Simplify nil check for hooks
    - Remove TODO comment
    
    This commit improves the readability, robustness, and execution order
    of the shutdown process. It ensures consistent state throughout the
    shutdown and guarantees hook execution even in error cases.
    yingjie.huang committed Oct 10, 2024
    Configuration menu
    Copy the full SHA
    137da86 View commit details
    Browse the repository at this point in the history
  2. feat: Enhance ShutdownWithContext test for improved reliability

    - Add shutdown hook verification
    - Implement better synchronization with channels
    - Improve error handling and assertions
    - Adjust timeouts for more consistent results
    - Add server state check after shutdown attempt
    - Include comments explaining expected behavior
    
    This commit improves the comprehensiveness and reliability of the
    ShutdownWithContext test, ensuring proper verification of shutdown
    hooks, timeout behavior, and server state during long-running requests.
    yingjie.huang committed Oct 10, 2024
    Configuration menu
    Copy the full SHA
    b41d084 View commit details
    Browse the repository at this point in the history

Commits on Oct 12, 2024

  1. Configuration menu
    Copy the full SHA
    e1ad8e9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a683166 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a4a5831 View commit details
    Browse the repository at this point in the history
  4. Merge branch 'main' of github.com:JIeJaitt/fiber into jiejaitt-featur…

    …e/improve-shutdown-with-context
    JIeJaitt committed Oct 12, 2024
    Configuration menu
    Copy the full SHA
    424ecbb View commit details
    Browse the repository at this point in the history
  5. Merge branch 'jiejaitt-feature/improve-shutdown-with-context' of gith…

    …ub.com:JIeJaitt/fiber into jiejaitt-feature/improve-shutdown-with-context
    JIeJaitt committed Oct 12, 2024
    Configuration menu
    Copy the full SHA
    98fbdff View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    796922f View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    e465b5b View commit details
    Browse the repository at this point in the history
  8. 🩹 Fix: Import sync/atomic

    JIeJaitt committed Oct 12, 2024
    Configuration menu
    Copy the full SHA
    ee866ec View commit details
    Browse the repository at this point in the history

Commits on Oct 13, 2024

  1. Configuration menu
    Copy the full SHA
    e0a56be View commit details
    Browse the repository at this point in the history
  2. Merge branches 'jiejaitt-feature/improve-shutdown-with-context' and '…

    …main' of github.com:JIeJaitt/fiber into jiejaitt-feature/improve-shutdown-with-context
    JIeJaitt committed Oct 13, 2024
    Configuration menu
    Copy the full SHA
    d01a09e View commit details
    Browse the repository at this point in the history

Commits on Oct 28, 2024

  1. Configuration menu
    Copy the full SHA
    750a7fa View commit details
    Browse the repository at this point in the history
  2. Merge branch 'main' of github.com:JIeJaitt/fiber into jiejaitt-featur…

    …e/improve-shutdown-with-context
    JIeJaitt committed Oct 28, 2024
    Configuration menu
    Copy the full SHA
    2ea0bb3 View commit details
    Browse the repository at this point in the history
  3. 🩹 Fix: go mod tidy

    JIeJaitt committed Oct 28, 2024
    Configuration menu
    Copy the full SHA
    b9509fe View commit details
    Browse the repository at this point in the history
  4. feat: Optimize ShutdownWithContext method in app.go

    - Reorder mutex lock acquisition to the start of the function
    - Early return if server is not running
    - Use defer for executing shutdown hooks
    - Simplify nil check for hooks
    - Remove TODO comment
    
    This commit improves the readability, robustness, and execution order
    of the shutdown process. It ensures consistent state throughout the
    shutdown and guarantees hook execution even in error cases.
    yingjie.huang authored and JIeJaitt committed Oct 28, 2024
    Configuration menu
    Copy the full SHA
    c2792e7 View commit details
    Browse the repository at this point in the history
  5. feat: Enhance ShutdownWithContext test for improved reliability

    - Add shutdown hook verification
    - Implement better synchronization with channels
    - Improve error handling and assertions
    - Adjust timeouts for more consistent results
    - Add server state check after shutdown attempt
    - Include comments explaining expected behavior
    
    This commit improves the comprehensiveness and reliability of the
    ShutdownWithContext test, ensuring proper verification of shutdown
    hooks, timeout behavior, and server state during long-running requests.
    yingjie.huang authored and JIeJaitt committed Oct 28, 2024
    Configuration menu
    Copy the full SHA
    18111e5 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    83ea43d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    66dcb42 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    f3902c5 View commit details
    Browse the repository at this point in the history
  9. 🩹 Fix: Import sync/atomic

    JIeJaitt committed Oct 28, 2024
    Configuration menu
    Copy the full SHA
    da193ac View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    0a92125 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    b0bc70c View commit details
    Browse the repository at this point in the history
  12. 🩹 Fix: go mod tidy

    JIeJaitt committed Oct 28, 2024
    Configuration menu
    Copy the full SHA
    44cbc62 View commit details
    Browse the repository at this point in the history
  13. Merge branch 'jiejaitt-feature/improve-shutdown-with-context' of gith…

    …ub.com:JIeJaitt/fiber into jiejaitt-feature/improve-shutdown-with-context
    JIeJaitt committed Oct 28, 2024
    Configuration menu
    Copy the full SHA
    0e99032 View commit details
    Browse the repository at this point in the history

Commits on Oct 29, 2024

  1. Merge branch 'main' of github.com:gofiber/fiber into jiejaitt-feature…

    …/improve-shutdown-with-context
    JIeJaitt committed Oct 29, 2024
    Configuration menu
    Copy the full SHA
    a32bddd View commit details
    Browse the repository at this point in the history