Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

.gitignore: add .swp

  • Loading branch information...
commit 5aabe05884d294683b630c71e55a9337556cecf4 1 parent eb2784c
@gnanderson gnanderson authored
Showing with 7 additions and 1 deletion.
  1. +2 −0  .gitignore
  2. +5 −1 server.go
View
2  .gitignore
@@ -1,6 +1,8 @@
*.6
_*
6.out
+*.swp
+tags
bin
examples/hot_restart/hot_restart
examples/hello_world/hello_world
View
6 server.go
@@ -71,7 +71,11 @@ func (srv *Server) socketListen() error {
if srv.listenerFile, err = l.File(); err != nil {
return err
}
- if e := setupFDNonblock(int(srv.listenerFile.Fd())); e != nil {
+ fd := int(srv.listenerFile.Fd())
+ if e := setupFDNonblock(fd); e != nil {
+ return e
+ }
+ if e := syscall.SetsockoptInt(fd, syscall.SOL_TCP , syscall.TCP_NODELAY , 1); e != nil {
return e
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.