Added error handling behavior documentation for Disconnect

This commit is contained in:
diamondburned (Forefront) 2020-06-13 16:33:33 -07:00
parent 831a6ea7e6
commit 391004677b
1 changed files with 8 additions and 2 deletions

View File

@ -103,11 +103,17 @@ type Session interface {
Namer
// Disconnect asks the service to disconnect. It does not necessarily mean
// removing the service. The frontend must cancel the active ServerMessage
// before disconnecting. The backend can rely on this behavior.
// removing the service.
//
// The frontend must cancel the active ServerMessage before disconnecting.
// The backend can rely on this behavior.
//
// The frontend will reuse the stored session data from SessionSaver to
// reconnect.
//
// When this function fails, the frontend may display the error upfront.
// However, it will treat the session as actually disconnected. If needed,
// the backend must implement reconnection by itself.
Disconnect() error
ServerList