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

Resuming from Sleep and other connection fixes #163

Merged
merged 7 commits into from
Jul 18, 2024
Merged

Commits on Jul 1, 2024

  1. Configuration menu
    Copy the full SHA
    82891d5 View commit details
    Browse the repository at this point in the history
  2. Support Suspend power mode change

    We previously didn't support the Suspend power mode change, which meant WinNUT would be paused in the middle of execution (and with an open socket) if the system goes to sleep. Now WinNUT has the chance to close down operations and connections, which seems to at least help with errors while changing power states. It looks like WinNUT still tries to reconnect too quickly after the system resumes from sleep (before networking is fully restored?) In the interest of reducing notification spam, it may be best to have WinNUT wait a few seconds before reconnecting.
    gbakeman committed Jul 1, 2024
    Configuration menu
    Copy the full SHA
    f741891 View commit details
    Browse the repository at this point in the history

Commits on Jul 2, 2024

  1. Removing Form-wide manual update variable

    Variable was essentially unused except for within the Update GUI trigger function, when it's predetermined anyways.
    gbakeman committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    47b803e View commit details
    Browse the repository at this point in the history
  2. Small socket, power mode changes

    - Socket Disconnect method now calls the Close_Socket method and raises the SocketDisconnected event in more cases
    - System Resume event now tries to disconnect the UPS if it's still considered connected.
    gbakeman committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    ef93c30 View commit details
    Browse the repository at this point in the history
  3. Login, socket improvements

    Nut_Socket.vb
    - Removed Socket object and any relating code since TcpClient is already providing the functionality.
    - Remove Disconnected event since this will be provided through exceptions or intentional commands.
    - Fixed use of LOGIN protocol command
    - Simplify Disconnect method
    
    UPS_Device.vb
    - Created dedicated Login method that interfaces with the socket layer.
    
    WinNUT.vb
    - Calls Login method only when a username is provided. Fixes forced/unintended logins.
    gbakeman committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    031bee4 View commit details
    Browse the repository at this point in the history

Commits on Jul 3, 2024

  1. More smaller networking bugfixes

    Nut_Socket.vb
    - ConnectionStatus property checks for null client object before checking .Connected property
    - TcpClient object is left null at construction, and only instantiated during a Connection subroutine.
    - Disconnect subroutine doesn't explicitly check for connection status on the TcpClient object before running anymore. This allows it to dispose/close all objects regardless.
    
    UPS_Device.vb
    - Fixed polling interval not being applied to timer. Associated property is now read only, and the interval is set directly on the timer during construction.
    - Fixed missing call to socket's Disconnect subroutine, and added a general exception catch-all.
    - Removed Login code from Reconnect subroutine, leaving that to external code.
    - Removed ReConnected event since it seems to duplicate the Connected event's calls.
    
    WinNUT.vb
    - Moved Login call to connection finalization subroutine.
    - Added LogException call during protocol error handling.
    gbakeman committed Jul 3, 2024
    Configuration menu
    Copy the full SHA
    ef6ce51 View commit details
    Browse the repository at this point in the history

Commits on Jul 15, 2024

  1. Smaller socket updates

    - Removed redundant IsConnected property in favor of ConnectionStatus
    - Renamed Nut and Net version properties and converted them to auto-implemented properties.
    - Wrapped version query statements in try-catch blocks in case servers that throw an error for these queries (Synology in particular) may not have further problems with other queries.
    - Added support for Net version 1.3
    gbakeman committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    4d58c43 View commit details
    Browse the repository at this point in the history