|
@@ -160,6 +160,8 @@ func (socket *Socket) RunSocketWriter() {
|
160
|
160
|
socket.linesToSend = []string{}
|
161
|
161
|
}
|
162
|
162
|
|
|
163
|
+ socket.linesToSendMutex.Unlock()
|
|
164
|
+
|
163
|
165
|
// write data
|
164
|
166
|
if 0 < len(data) {
|
165
|
167
|
_, err := socket.conn.Write([]byte(data))
|
|
@@ -172,11 +174,8 @@ func (socket *Socket) RunSocketWriter() {
|
172
|
174
|
|
173
|
175
|
// check if we're closed
|
174
|
176
|
if socket.Closed {
|
175
|
|
- socket.linesToSendMutex.Unlock()
|
176
|
177
|
break
|
177
|
178
|
}
|
178
|
|
-
|
179
|
|
- socket.linesToSendMutex.Unlock()
|
180
|
179
|
}
|
181
|
180
|
if errOut {
|
182
|
181
|
// error out, bad stuff happened
|