Skip to content
This repository was archived by the owner on Sep 29, 2024. It is now read-only.

Commit cf54d38

Browse files
authored
Merge pull request #424 from rad1k4l/patch-1
Handle error on NewServer
2 parents 41b43a7 + 1710d4a commit cf54d38

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

_example/README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ import (
1212
)
1313

1414
func main() {
15-
server := socketio.NewServer(nil)
15+
server, serveError := socketio.NewServer(nil)
16+
if serveError != nil {
17+
log.Fatalln(serveError)
18+
}
1619

1720
server.OnConnect("/", func(s socketio.Conn) error {
1821
s.SetContext("")
@@ -149,4 +152,4 @@ Possible reasons:
149152
150153
| Reason | Side | Description |
151154
|------------|-------------|------------|
152-
| client namespace disconnect | Client Side | Got disconnect packet from client |
155+
| client namespace disconnect | Client Side | Got disconnect packet from client |

0 commit comments

Comments
 (0)