Permalink
Browse files

.gitignore: add .swp

  • Loading branch information...
gnanderson committed Apr 12, 2012
1 parent eb2784c commit 5aabe05884d294683b630c71e55a9337556cecf4
Showing with 7 additions and 1 deletion.
  1. +2 −0 .gitignore
  2. +5 −1 server.go
View
@@ -1,6 +1,8 @@
*.6
_*
6.out
+*.swp
+tags
bin
examples/hot_restart/hot_restart
examples/hello_world/hello_world
View
@@ -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
}
}

0 comments on commit 5aabe05

Please sign in to comment.