File tree 1 file changed +0
-23
lines changed
1 file changed +0
-23
lines changed Original file line number Diff line number Diff line change @@ -66,9 +66,6 @@ type session struct {
66
66
st sessionState
67
67
stm sync.Mutex
68
68
69
- id uint32
70
- idm sync.Mutex
71
-
72
69
err NotificationResult
73
70
}
74
71
@@ -79,7 +76,6 @@ func NewSession(conn Conn) Session {
79
76
stm : sync.Mutex {},
80
77
conn : conn ,
81
78
connm : sync.Mutex {},
82
- idm : sync.Mutex {},
83
79
b : newBuffer (50 ),
84
80
}
85
81
}
@@ -124,9 +120,6 @@ func (s *session) Send(n Notification) error {
124
120
return errors .New ("not connected" )
125
121
}
126
122
127
- // Set identifier if not specified
128
- n .Identifier = s .determineIdentifier (n .Identifier )
129
-
130
123
// Serialize
131
124
b , err := n .ToBinary ()
132
125
if err != nil {
@@ -195,22 +188,6 @@ func (s *session) transitionState(st sessionState) {
195
188
s .st = st
196
189
}
197
190
198
- func (s * session ) determineIdentifier (n uint32 ) uint32 {
199
- s .idm .Lock ()
200
- defer s .idm .Unlock ()
201
-
202
- // If the id passed in is 0, that means it wasn't
203
- // set so get the next ID. Otherwise, set it to that
204
- // identifier.
205
- if n == 0 {
206
- s .id ++
207
- } else {
208
- s .id = n
209
- }
210
-
211
- return s .id
212
- }
213
-
214
191
func (s * session ) readErrors () {
215
192
p := make ([]byte , 6 , 6 )
216
193
You can’t perform that action at this time.
0 commit comments