Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
G
gost
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
gost
Commits
59e7057f
"...Demo/svn:/svn.code.sf.net/p/irrlicht/code/trunk@3337" did not exist on "976b62fc23a1a59ad5f2ffcd99470c5f71c78987"
Commit
59e7057f
authored
Jan 11, 2016
by
rui.zheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix websocket crash
parent
3835ab43
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
ws.go
ws.go
+6
-3
No files found.
ws.go
View file @
59e7057f
...
@@ -129,15 +129,18 @@ func (s *ws) handle(w http.ResponseWriter, r *http.Request) {
...
@@ -129,15 +129,18 @@ func (s *ws) handle(w http.ResponseWriter, r *http.Request) {
}
}
func
(
s
*
ws
)
ListenAndServe
()
error
{
func
(
s
*
ws
)
ListenAndServe
()
error
{
http
.
HandleFunc
(
"/ws"
,
s
.
handle
)
sm
:=
http
.
NewServeMux
()
return
http
.
ListenAndServe
(
s
.
arg
.
Addr
,
nil
)
sm
.
HandleFunc
(
"/ws"
,
s
.
handle
)
return
http
.
ListenAndServe
(
s
.
arg
.
Addr
,
sm
)
}
}
func
(
s
*
ws
)
listenAndServeTLS
()
error
{
func
(
s
*
ws
)
listenAndServeTLS
()
error
{
http
.
HandleFunc
(
"/ws"
,
s
.
handle
)
sm
:=
http
.
NewServeMux
()
sm
.
HandleFunc
(
"/ws"
,
s
.
handle
)
server
:=
&
http
.
Server
{
server
:=
&
http
.
Server
{
Addr
:
s
.
arg
.
Addr
,
Addr
:
s
.
arg
.
Addr
,
TLSConfig
:
&
tls
.
Config
{
Certificates
:
[]
tls
.
Certificate
{
s
.
arg
.
Cert
}},
TLSConfig
:
&
tls
.
Config
{
Certificates
:
[]
tls
.
Certificate
{
s
.
arg
.
Cert
}},
Handler
:
sm
,
}
}
return
server
.
ListenAndServeTLS
(
""
,
""
)
return
server
.
ListenAndServeTLS
(
""
,
""
)
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment