Changeset 652 in code for trunk/service.go
- Timestamp:
- Oct 18, 2021, 5:15:15 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/service.go
r625 r652 2 2 3 3 import ( 4 "context" 4 5 "crypto/sha1" 5 6 "crypto/sha256" … … 658 659 net.SASL.Mechanism = "EXTERNAL" 659 660 660 if err := dc.srv.db.StoreNetwork( dc.user.ID, &net.Network); err != nil {661 if err := dc.srv.db.StoreNetwork(context.TODO(), dc.user.ID, &net.Network); err != nil { 661 662 return err 662 663 } … … 699 700 net.SASL.Mechanism = "PLAIN" 700 701 701 if err := dc.srv.db.StoreNetwork( dc.user.ID, &net.Network); err != nil {702 if err := dc.srv.db.StoreNetwork(context.TODO(), dc.user.ID, &net.Network); err != nil { 702 703 return err 703 704 } … … 723 724 net.SASL.Mechanism = "" 724 725 725 if err := dc.srv.db.StoreNetwork( dc.user.ID, &net.Network); err != nil {726 if err := dc.srv.db.StoreNetwork(context.TODO(), dc.user.ID, &net.Network); err != nil { 726 727 return err 727 728 } … … 861 862 u.stop() 862 863 863 if err := dc.srv.db.DeleteUser( u.ID); err != nil {864 if err := dc.srv.db.DeleteUser(context.TODO(), u.ID); err != nil { 864 865 return fmt.Errorf("failed to delete user: %v", err) 865 866 } … … 1016 1017 uc.updateChannelAutoDetach(upstreamName) 1017 1018 1018 if err := dc.srv.db.StoreChannel( uc.network.ID, ch); err != nil {1019 if err := dc.srv.db.StoreChannel(context.TODO(), uc.network.ID, ch); err != nil { 1019 1020 return fmt.Errorf("failed to update channel: %v", err) 1020 1021 } … … 1025 1026 1026 1027 func handleServiceServerStatus(dc *downstreamConn, params []string) error { 1027 dbStats, err := dc.user.srv.db.Stats( )1028 dbStats, err := dc.user.srv.db.Stats(context.TODO()) 1028 1029 if err != nil { 1029 1030 return err
Note:
See TracChangeset
for help on using the changeset viewer.