http: fix potential problem

This commit is contained in:
nadoo committed 2018-12-14 00:02:25 +08:00
1 parent c6a879dded
commit 51fedc8653
5 files changed
+63 -19

No files matched your search

+2
View File
@@ -168,6 +168,7 @@ func (s *KCP) ListenAndServe() {
continue
}
// TODO: change them to customizable later?
c.SetStreamMode(true)
c.SetWriteDelay(false)
c.SetNoDelay(0, 30, 2, 1)
@@ -204,6 +205,7 @@ func (s *KCP) Dial(network, addr string) (net.Conn, error) {
return nil, err
}
// TODO: change them to customizable later?
c.SetStreamMode(true)
c.SetWriteDelay(false)
c.SetNoDelay(0, 30, 2, 1)