mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-04 06:54:45 +08:00
崩溃保护
This commit is contained in:
@@ -118,10 +118,12 @@ func (ws *WebsocketClient) StartConnect() error {
|
||||
|
||||
//Start ...
|
||||
func (ws *WebsocketClient) Start() error {
|
||||
ws.bRun = true
|
||||
ws.state = 0
|
||||
go ws.OnRun()
|
||||
go ws.writeMsg()
|
||||
if ws.bRun == false {
|
||||
ws.bRun = true
|
||||
ws.state = 0
|
||||
go ws.OnRun()
|
||||
go ws.writeMsg()
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user